class Beaver::RefundsRequest
RefundsRequest
Model.
Attributes
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/refunds_request.rb, line 39 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'] # Create object from extracted values. RefundsRequest.new(custom_data, rbits, reference_id) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/refunds_request.rb, line 22 def self.names @_hash = {} if @_hash.nil? @_hash['custom_data'] = 'custom_data' @_hash['rbits'] = 'rbits' @_hash['reference_id'] = 'reference_id' @_hash end
new(custom_data = nil, rbits = nil, reference_id = nil)
click to toggle source
# File lib/beaver/models/refunds_request.rb, line 30 def initialize(custom_data = nil, rbits = nil, reference_id = nil) @custom_data = custom_data @rbits = rbits @reference_id = reference_id end