Sha256: 8f1c9f0358bcfdaa82236140d7bf1c848c1c05ce9a00af423510ea93c8226b00

Contents?: true

Size: 352 Bytes

Versions: 9

Compression:

Stored size: 352 Bytes

Contents

module Paddle
  module Classic
    class ChargesResource < Resource
      def create(subscription_id:, amount:, charge_name:)
        attrs = { amount: amount, charge_name: charge_name }
        response = post_request("2.0/subscription/#{subscription_id}/charge", body: attrs)
        Charge.new(response.body["response"])
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
paddle-2.7.0 lib/paddle/classic/resources/charges.rb
paddle-2.6.0 lib/paddle/classic/resources/charges.rb
paddle-2.5.2 lib/paddle/classic/resources/charges.rb
paddle-2.5.1 lib/paddle/classic/resources/charges.rb
paddle-2.5.0 lib/paddle/classic/resources/charges.rb
paddle-2.4.1 lib/paddle/classic/resources/charges.rb
paddle-2.4.0 lib/paddle/classic/resources/charges.rb
paddle-2.3.0 lib/paddle/classic/resources/charges.rb
paddle-2.2.1 lib/paddle/classic/resources/charges.rb