Sha256: 4924effe070e5badfc2116c39218732154e3e2c697c19c8b828c462a4eb0dcfe

Contents?: true

Size: 505 Bytes

Versions: 6

Compression:

Stored size: 505 Bytes

Contents

module Paysio
  class Charge < Paysio::Resource
    include Paysio::Actions::List
    include Paysio::Actions::Create
    include Paysio::Actions::Update
    include Paysio::Actions::Find
    resource :charge

    def refund(attrs = {})
      response = Paysio::Client.request(:post, action_path(:refund), attrs)
      refresh_from(response.to_hash)
    end

    def invoice
      response = Paysio::Client.request(:get, action_path(:invoice))
      Resource.build_from(response.to_hash)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
paysio-1.0.10 lib/paysio/resources/charge.rb
paysio-1.0.9 lib/paysio/resources/charge.rb
paysio-1.0.8 lib/paysio/resources/charge.rb
paysio-1.0.7 lib/paysio/resources/charge.rb
paysio-1.0.6 lib/paysio/resources/charge.rb
paysio-1.0.5 lib/paysio/resources/charge.rb