Sha256: a0dad090fd4b7f5c87534995760db1635c4f74a07787ba7f291087ee87a21af7
Contents?: true
Size: 891 Bytes
Versions: 9
Compression:
Stored size: 891 Bytes
Contents
module Paddle module Classic class ModifiersResource < Resource def list(**params) response = post_request("2.0/subscription/modifiers", body: params) Collection.from_response(response, type: Modifier) end def create(subscription_id:, modifier_amount:, **params) attrs = { subscription_id: subscription_id, modifier_amount: modifier_amount } create_response = post_request("2.0/subscription/modifiers/create", body: attrs.merge(params)) response = post_request("2.0/subscription/modifiers", body: { subscription_id: subscription_id }) Collection.from_response(response, type: Modifier) end def delete(modifier_id:) attrs = { modifier_id: modifier_id } response = post_request("2.0/subscription/modifiers/delete", body: attrs) true if response.success? end end end end
Version data entries
9 entries across 9 versions & 1 rubygems