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
adding usage charge resource #221
Conversation
@@ -19,5 +19,9 @@ def cancel | |||
def activate | |||
load_attributes_from_response(post(:activate)) | |||
end | |||
|
|||
def customize(capped_amount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a hash so its customize(capped_amount: 10)
?
6ef015e
to
fc951fe
Compare
fc951fe
to
ef67b98
Compare
f0787a5
to
49dad78
Compare
49dad78
to
d9af79a
Compare
@Shopify/finance 👀 please Need to merge, so I can write some api unit tests for usage charges within shopify to help @joshubrown with documentation |
class << self | ||
def index(recurring_application_charge_id) | ||
UsageCharge.find(:all, :params => { :recurring_application_charge_id => recurring_application_charge_id }) | ||
rescue ActiveResource::ForbiddenAccess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you catching this - if you let it bubble up doesn't the client get a 403 and wouldn't that be preferred?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry - this is the client API already - this is the 403 coming back from the server
d9af79a
to
de89c06
Compare
|
||
usage_charges = ShopifyAPI::UsageCharge.find(:all, params: {recurring_application_charge_id: 654381177}) | ||
|
||
assert_equal 2, usage_charges.length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a test for RecurringAppCharges with no usage charges
d867423
to
933754e
Compare
👍 |
1 similar comment
👍 |
adding usage charge resource
Description
@Shopify/finance @dominiquesr @Not-Jake