Sha256: c55da684dbab4964c7c9af38e901c44d126e38fdd45e31819bc3bc62f9893b16

Contents?: true

Size: 352 Bytes

Versions: 10

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

10 entries across 10 versions & 1 rubygems

Version Path
paddle-2.2.0 lib/paddle/classic/resources/charges.rb
paddle-2.1.4 lib/paddle/classic/resources/charges.rb
paddle-2.1.3 lib/paddle/classic/resources/charges.rb
paddle-2.1.2 lib/paddle/classic/resources/charges.rb
paddle-2.1.1 lib/paddle/classic/resources/charges.rb
paddle-2.1.0 lib/paddle/classic/resources/charges.rb
paddle-2.0.0 lib/paddle/classic/resources/charges.rb
paddle-1.1.2 lib/paddle/classic/resources/charges.rb
paddle-1.1.1 lib/paddle/classic/resources/charges.rb
paddle-1.1.0 lib/paddle/classic/resources/charges.rb