Skip to content

Add created_at on order response #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2021
Merged

Add created_at on order response #44

merged 1 commit into from
Sep 8, 2021

Conversation

pcothenet
Copy link
Contributor

@pcothenet pcothenet commented Sep 8, 2021

What

  • Surface the created_at field on all order responses

Why

  • For ease of use when retrieving orders

SDK Release Checklist

  • Have you added an integration test for the changes?
  • Have you built the gem locally and made queries against it successfully?
  • Did you update the changelog?
  • Did you bump the package version?
  • For breaking changes, did you plan for the release of the new SDK versions and deploy the API to production?

:'timestamp' => :'String',
:'timestamp' => :'Time',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bonus of defining the type correctly in swagger.

Technically this could be breaking, but I'm going to make the bet that no one uses this one.

@@ -37,6 +37,7 @@
order = create_order_response.data
expect(create_order_response.success).to eq true
expect(order.id).not_to be_nil
expect(order.created_at).to be_a_kind_of(Time)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the correct type, the SDK does all the parsing and automatically returns a Time object. Success!

@pcothenet pcothenet requested a review from kleinjm September 8, 2021 21:49
@pcothenet pcothenet merged commit 5c50f4d into main Sep 8, 2021
@pcothenet pcothenet deleted the pc/createdat branch September 8, 2021 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants