class Cryptopay::CoinWithdrawalParams
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::CoinWithdrawalParams] Returns the model itself
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 120 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/coin_withdrawal_params.rb, line 44 def initialize(attributes = {}) @attributes = ENCODER.sanitize(attributes) end
Public Instance Methods
address()
click to toggle source
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 48 def address @attributes[:address] end
charged_amount()
click to toggle source
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 60 def charged_amount @attributes[:charged_amount] end
charged_amount_to_send()
click to toggle source
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 64 def charged_amount_to_send @attributes[:charged_amount_to_send] end
charged_currency()
click to toggle source
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 52 def charged_currency @attributes[:charged_currency] end
custom_id()
click to toggle source
The payment reference ID in your system
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 73 def custom_id @attributes[:custom_id] end
customer_id()
click to toggle source
The internal ID of your customer that the wihdrawal relates to
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 78 def customer_id @attributes[:customer_id] end
force_commit()
click to toggle source
Set ‘true` by default. Set `false` for two-step withdrawal and commit it within 30 seconds
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 87 def force_commit @attributes[:force_commit] end
inspect()
click to toggle source
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 131 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/coin_withdrawal_params.rb, line 93 def invalid_properties properties = [] properties.push('invalid value for "address", address cannot be nil.') if address.nil? 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 if !network_fee_level.nil? && !%w[fast average slow].include?(network_fee_level) properties.push('invalid value for network_fee_level, must be one of "fast", "average", "slow"') end properties end
network_fee_level()
click to toggle source
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 82 def network_fee_level @attributes[:network_fee_level] end
received_amount()
click to toggle source
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 68 def received_amount @attributes[:received_amount] end
received_currency()
click to toggle source
# File lib/cryptopay/models/coin_withdrawal_params.rb, line 56 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/coin_withdrawal_params.rb, line 127 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/coin_withdrawal_params.rb, line 113 def valid? invalid_properties.empty? end