Skip to content
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

Remove UsageRecord.create method #826

Merged
merged 1 commit into from
Aug 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions lib/stripe/resources/usage_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,5 @@
module Stripe
class UsageRecord < APIResource
OBJECT_NAME = "usage_record"

def self.create(params = {}, opts = {})
unless params.key?(:subscription_item)
raise ArgumentError, "Params must have a subscription_item key"
end

req_params = params.clone.delete_if do |key, _value|
key == :subscription_item
end
resp, opts = request(
:post,
"/v1/subscription_items/#{params[:subscription_item]}/usage_records",
req_params,
opts
)
Util.convert_to_stripe_object(resp.data, opts)
end
end
end
28 changes: 0 additions & 28 deletions test/stripe/usage_record_test.rb

This file was deleted.