class Beaver::Disputes
Disputes
Model.
Attributes
TODO: Write general description for this method @return [Integer]
Owner structure to be used in any resource where an account is the owner @return [String]
Owner structure to be used in any resource where an account is the owner @return [CardBrandEnum]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [Object]
TODO: Write general description for this method @return [Documentation]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [String]
Owner structure to be used in any resource where an account is the owner @return [OwnerIsAccount]
Owner structure to be used in any resource where an account is the owner @return [String]
Owner structure to be used in any resource where an account is the owner @return [PaymentNonExpanded]
Owner structure to be used in any resource where an account is the owner @return [DisputeReason]
Owner structure to be used in any resource where an account is the owner @return [Resolution]
Owner structure to be used in any resource where an account is the owner @return [String]
Owner structure to be used in any resource where an account is the owner @return [Status5Enum]
Owner structure to be used in any resource where an account is the owner @return [TransactionRecordNonExpanded]
Owner structure to be used in any resource where an account is the owner @return [TransactionRecordNonExpanded]
Owner structure to be used in any resource where an account is the owner @return [TransactionRecordNonExpanded]
Owner structure to be used in any resource where an account is the owner @return [TransactionRecordNonExpanded]
Owner structure to be used in any resource where an account is the owner @return [TransactionRecordNonExpanded]
Owner structure to be used in any resource where an account is the owner @return [Type6Enum]
Public Class Methods
Creates an instance of the object from a hash.
# File lib/beaver/models/disputes.rb, line 174 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. amount = hash['amount'] create_time = hash['create_time'] currency = hash['currency'] documentation = Documentation.from_hash(hash['documentation']) if hash['documentation'] fee = hash['fee'] id = hash['id'] owner = OwnerIsAccount.from_hash(hash['owner']) if hash['owner'] path = hash['path'] payment = PaymentNonExpanded.from_hash(hash['payment']) if hash['payment'] card_brand = hash['card_brand'] reason = DisputeReason.from_hash(hash['reason']) if hash['reason'] resolution = Resolution.from_hash(hash['resolution']) if hash['resolution'] resource = hash['resource'] status = hash['status'] if hash['txnr_chargeback_app_fees'] txnr_chargeback_app_fees = TransactionRecordNonExpanded.from_hash(hash['txnr_chargeback_app_fees']) end if hash['txnr_chargeback_merchant'] txnr_chargeback_merchant = TransactionRecordNonExpanded.from_hash(hash['txnr_chargeback_merchant']) end if hash['txnr_chargeback_reversal_app_fee'] txnr_chargeback_reversal_app_fee = TransactionRecordNonExpanded.from_hash(hash['txnr_chargeback_reversal_app_fee']) end if hash['txnr_chargeback_reversal_merchant'] txnr_chargeback_reversal_merchant = TransactionRecordNonExpanded.from_hash(hash['txnr_chargeback_reversal_merchant']) end if hash['txnr_merchant_chargeback_fee'] txnr_merchant_chargeback_fee = TransactionRecordNonExpanded.from_hash(hash['txnr_merchant_chargeback_fee']) end type = hash['type'] custom_data = hash['custom_data'] api_version = hash['api_version'] # Create object from extracted values. Disputes.new(amount, create_time, currency, documentation, fee, id, owner, path, payment, card_brand, reason, resolution, resource, status, txnr_chargeback_app_fees, txnr_chargeback_merchant, txnr_chargeback_reversal_app_fee, txnr_chargeback_reversal_merchant, txnr_merchant_chargeback_fee, type, custom_data, api_version) end
A mapping from model property names to API property names.
# File lib/beaver/models/disputes.rb, line 98 def self.names @_hash = {} if @_hash.nil? @_hash['amount'] = 'amount' @_hash['create_time'] = 'create_time' @_hash['currency'] = 'currency' @_hash['custom_data'] = 'custom_data' @_hash['documentation'] = 'documentation' @_hash['fee'] = 'fee' @_hash['id'] = 'id' @_hash['owner'] = 'owner' @_hash['path'] = 'path' @_hash['payment'] = 'payment' @_hash['card_brand'] = 'card_brand' @_hash['reason'] = 'reason' @_hash['resolution'] = 'resolution' @_hash['resource'] = 'resource' @_hash['status'] = 'status' @_hash['txnr_chargeback_app_fees'] = 'txnr_chargeback_app_fees' @_hash['txnr_chargeback_merchant'] = 'txnr_chargeback_merchant' @_hash['txnr_chargeback_reversal_app_fee'] = 'txnr_chargeback_reversal_app_fee' @_hash['txnr_chargeback_reversal_merchant'] = 'txnr_chargeback_reversal_merchant' @_hash['txnr_merchant_chargeback_fee'] = 'txnr_merchant_chargeback_fee' @_hash['type'] = 'type' @_hash['api_version'] = 'api_version' @_hash end
# File lib/beaver/models/disputes.rb, line 127 def initialize(amount = nil, create_time = nil, currency = nil, documentation = nil, fee = nil, id = nil, owner = nil, path = nil, payment = nil, card_brand = nil, reason = nil, resolution = nil, resource = nil, status = nil, txnr_chargeback_app_fees = nil, txnr_chargeback_merchant = nil, txnr_chargeback_reversal_app_fee = nil, txnr_chargeback_reversal_merchant = nil, txnr_merchant_chargeback_fee = nil, type = nil, custom_data = nil, api_version = nil) @amount = amount @create_time = create_time @currency = currency @custom_data = custom_data @documentation = documentation @fee = fee @id = id @owner = owner @path = path @payment = payment @card_brand = card_brand @reason = reason @resolution = resolution @resource = resource @status = status @txnr_chargeback_app_fees = txnr_chargeback_app_fees @txnr_chargeback_merchant = txnr_chargeback_merchant @txnr_chargeback_reversal_app_fee = txnr_chargeback_reversal_app_fee @txnr_chargeback_reversal_merchant = txnr_chargeback_reversal_merchant @txnr_merchant_chargeback_fee = txnr_merchant_chargeback_fee @type = type @api_version = api_version end