Sha256: a5a3d55f065d06616161fa88ec84185a7f5e5c08948796fdfdb5899b2d834d3f
Contents?: true
Size: 613 Bytes
Versions: 21
Compression:
Stored size: 613 Bytes
Contents
require_relative '../resource' module Tickethub class Supplier::Charge < Resource path '/supplier/charges' attribute :amount, type: :money attribute :tax, type: :money 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