class Beaver::PaymentsRequest1
PaymentsRequest1
Model.
Attributes
amounts[RW]
TODO: Write general description for this method @return [CaptureAmounts]
custom_data[RW]
TODO: Write general description for this method @return [Object]
rbits[RW]
TODO: Write general description for this method @return [List of EmbeddedRbit]
reference_id[RW]
TODO: Write general description for this method @return [String]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/payments_request1.rb, line 46 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. custom_data = hash['custom_data'] # Parameter is an array, so we need to iterate through it rbits = nil unless hash['rbits'].nil? rbits = [] hash['rbits'].each do |structure| rbits << (EmbeddedRbit.from_hash(structure) if structure) end end reference_id = hash['reference_id'] amounts = CaptureAmounts.from_hash(hash['amounts']) if hash['amounts'] # Create object from extracted values. PaymentsRequest1.new(custom_data, rbits, reference_id, amounts) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/payments_request1.rb, line 26 def self.names @_hash = {} if @_hash.nil? @_hash['custom_data'] = 'custom_data' @_hash['rbits'] = 'rbits' @_hash['reference_id'] = 'reference_id' @_hash['amounts'] = 'amounts' @_hash end
new(custom_data = nil, rbits = nil, reference_id = nil, amounts = nil)
click to toggle source
# File lib/beaver/models/payments_request1.rb, line 35 def initialize(custom_data = nil, rbits = nil, reference_id = nil, amounts = nil) @custom_data = custom_data @rbits = rbits @reference_id = reference_id @amounts = amounts end