class Cryptopay::ExchangeTransferParams
Constants
- ENCODER
Public Class Methods
build_from_hash(data)
click to toggle source
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Cryptopay::ExchangeTransferParams] Returns the model itself
# File lib/cryptopay/models/exchange_transfer_params.rb, line 86 def self.build_from_hash(data) attributes = ENCODER.build_from_hash(data) new(attributes) end
new(attributes = {})
click to toggle source
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/cryptopay/models/exchange_transfer_params.rb, line 35 def initialize(attributes = {}) @attributes = ENCODER.sanitize(attributes) end
Public Instance Methods
charged_amount()
click to toggle source
# File lib/cryptopay/models/exchange_transfer_params.rb, line 43 def charged_amount @attributes[:charged_amount] end
charged_currency()
click to toggle source
# File lib/cryptopay/models/exchange_transfer_params.rb, line 39 def charged_currency @attributes[:charged_currency] end
custom_id()
click to toggle source
# File lib/cryptopay/models/exchange_transfer_params.rb, line 55 def custom_id @attributes[:custom_id] end
force_commit()
click to toggle source
# File lib/cryptopay/models/exchange_transfer_params.rb, line 59 def force_commit @attributes[:force_commit] end
inspect()
click to toggle source
# File lib/cryptopay/models/exchange_transfer_params.rb, line 97 def inspect "#<#{self.class}:0x#{object_id.to_s(16)}> JSON: " + JSON.pretty_generate(to_hash) end
invalid_properties()
click to toggle source
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/cryptopay/models/exchange_transfer_params.rb, line 65 def invalid_properties properties = [] properties.push('invalid value for "charged_currency", charged_currency cannot be nil.') if charged_currency.nil? if received_currency.nil? properties.push('invalid value for "received_currency", received_currency cannot be nil.') end properties end
received_amount()
click to toggle source
# File lib/cryptopay/models/exchange_transfer_params.rb, line 51 def received_amount @attributes[:received_amount] end
received_currency()
click to toggle source
# File lib/cryptopay/models/exchange_transfer_params.rb, line 47 def received_currency @attributes[:received_currency] end
to_hash()
click to toggle source
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/cryptopay/models/exchange_transfer_params.rb, line 93 def to_hash ENCODER.to_hash(@attributes) end
valid?()
click to toggle source
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/cryptopay/models/exchange_transfer_params.rb, line 79 def valid? invalid_properties.empty? end