class Beaver::PaymentsCancelRequest
PaymentsCancelRequest
Model.
Attributes
cancel_reason[RW]
TODO: Write general description for this method @return [String]
rbits[RW]
TODO: Write general description for this method @return [List of EmbeddedRbit]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/payments_cancel_request.rb, line 32 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. cancel_reason = hash['cancel_reason'] # 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 # Create object from extracted values. PaymentsCancelRequest.new(cancel_reason, rbits) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/payments_cancel_request.rb, line 18 def self.names @_hash = {} if @_hash.nil? @_hash['cancel_reason'] = 'cancel_reason' @_hash['rbits'] = 'rbits' @_hash end
new(cancel_reason = nil, rbits = nil)
click to toggle source
# File lib/beaver/models/payments_cancel_request.rb, line 25 def initialize(cancel_reason = nil, rbits = nil) @cancel_reason = cancel_reason @rbits = rbits end