Sha256: 367e33ae95df9611226cbb66af72814fcf27636322557eee94c638431ae6d657
Contents?: true
Size: 613 Bytes
Versions: 10
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
10 entries across 10 versions & 1 rubygems