Sha256: e739535a7ac435066cf79e79ab89af0f07360d35aca65a40be589ad725e88e55
Contents?: true
Size: 937 Bytes
Versions: 13
Compression:
Stored size: 937 Bytes
Contents
require_relative '../resource' module Tickethub class Supplier::Payment < Resource path '/supplier/payments' require_relative 'payment/card' require_relative 'payment/cash' require_relative 'payment/credit' require_relative 'payment/direct' require_relative 'payment/gratuity' require_relative 'order' require_relative 'user' association :order, Supplier::Order association :user, Supplier::User attribute :amount, type: :money attribute :refunded, type: :money attribute :currency, type: :currency attribute :refunded_at, type: :datetime attribute :created_at, type: :datetime attribute :updated_at, type: :datetime def refund(attributes) self.load @endpoint[:refund].post(attributes).decoded return true rescue Tickethub::ResourceInvalid => err self.load Tickethub::Response.new(err.response).decoded return false end end end
Version data entries
13 entries across 13 versions & 1 rubygems