Sha256: 446d3f7eeaba62bdd7fe79cb859f5e9008fb3ca8a16b388f9325fc17df796e14
Contents?: true
Size: 689 Bytes
Versions: 21
Compression:
Stored size: 689 Bytes
Contents
require_relative '../resource' module Tickethub class Supplier::Charge < Resource path '/supplier/charges' attribute :amount, type: :money attribute :tax, type: :money require_relative 'partner' association :partner, Supplier::Partner association :context, -> (endpoint, attributes) { case attributes['object'] when 'Refund' then Supplier::Refund.call(endpoint, attributes) when 'Payment' then Supplier::Payment.call(endpoint, attributes) when 'Adjustment' then Supplier::Adjustment.call(endpoint, attributes) end } attribute :updated_at, type: :datetime attribute :created_at, type: :datetime end end
Version data entries
21 entries across 21 versions & 1 rubygems