Class: Devdraft::CreateLiquidationAddressDto
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Devdraft::CreateLiquidationAddressDto
- Defined in:
- lib/devdraft/models/create_liquidation_address_dto.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#address ⇒ Object
The liquidation address on the blockchain.
-
#bridge_wallet_id ⇒ Object
Bridge Wallet to send funds to.
-
#chain ⇒ Object
The blockchain chain for the liquidation address.
-
#currency ⇒ Object
The currency for the liquidation address.
-
#custom_developer_fee_percent ⇒ Object
Custom developer fee percentage (Base 100 percentage: 10.2% = "10.2").
-
#destination_ach_reference ⇒ Object
Reference for ACH transactions.
-
#destination_address ⇒ Object
Crypto wallet address for crypto transfers.
-
#destination_blockchain_memo ⇒ Object
Memo for blockchain transactions.
-
#destination_currency ⇒ Object
Currency for sending funds.
-
#destination_payment_rail ⇒ Object
Payment rail for sending funds.
-
#destination_sepa_reference ⇒ Object
Reference for SEPA transactions.
-
#destination_wire_message ⇒ Object
Message for wire transfers.
-
#external_account_id ⇒ Object
External bank account to send funds to.
-
#prefunded_account_id ⇒ Object
Developer’s prefunded account id.
-
#return_address ⇒ Object
Address to return funds on failed transactions (Not supported on Stellar).
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CreateLiquidationAddressDto
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ CreateLiquidationAddressDto
Initializes the object
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 145 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::CreateLiquidationAddressDto` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::CreateLiquidationAddressDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'chain') self.chain = attributes[:'chain'] else self.chain = nil end if attributes.key?(:'currency') self.currency = attributes[:'currency'] else self.currency = nil end if attributes.key?(:'address') self.address = attributes[:'address'] else self.address = nil end if attributes.key?(:'external_account_id') self.external_account_id = attributes[:'external_account_id'] end if attributes.key?(:'prefunded_account_id') self.prefunded_account_id = attributes[:'prefunded_account_id'] end if attributes.key?(:'bridge_wallet_id') self.bridge_wallet_id = attributes[:'bridge_wallet_id'] end if attributes.key?(:'destination_payment_rail') self.destination_payment_rail = attributes[:'destination_payment_rail'] end if attributes.key?(:'destination_currency') self.destination_currency = attributes[:'destination_currency'] end if attributes.key?(:'destination_wire_message') self. = attributes[:'destination_wire_message'] end if attributes.key?(:'destination_sepa_reference') self.destination_sepa_reference = attributes[:'destination_sepa_reference'] end if attributes.key?(:'destination_ach_reference') self.destination_ach_reference = attributes[:'destination_ach_reference'] end if attributes.key?(:'destination_address') self.destination_address = attributes[:'destination_address'] end if attributes.key?(:'destination_blockchain_memo') self.destination_blockchain_memo = attributes[:'destination_blockchain_memo'] end if attributes.key?(:'return_address') self.return_address = attributes[:'return_address'] end if attributes.key?(:'custom_developer_fee_percent') self.custom_developer_fee_percent = attributes[:'custom_developer_fee_percent'] end end |
Instance Attribute Details
#address ⇒ Object
The liquidation address on the blockchain
25 26 27 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 25 def address @address end |
#bridge_wallet_id ⇒ Object
Bridge Wallet to send funds to
34 35 36 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 34 def bridge_wallet_id @bridge_wallet_id end |
#chain ⇒ Object
The blockchain chain for the liquidation address
19 20 21 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 19 def chain @chain end |
#currency ⇒ Object
The currency for the liquidation address
22 23 24 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 22 def currency @currency end |
#custom_developer_fee_percent ⇒ Object
Custom developer fee percentage (Base 100 percentage: 10.2% = "10.2")
61 62 63 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 61 def custom_developer_fee_percent @custom_developer_fee_percent end |
#destination_ach_reference ⇒ Object
Reference for ACH transactions
49 50 51 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 49 def destination_ach_reference @destination_ach_reference end |
#destination_address ⇒ Object
Crypto wallet address for crypto transfers
52 53 54 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 52 def destination_address @destination_address end |
#destination_blockchain_memo ⇒ Object
Memo for blockchain transactions
55 56 57 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 55 def destination_blockchain_memo @destination_blockchain_memo end |
#destination_currency ⇒ Object
Currency for sending funds
40 41 42 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 40 def destination_currency @destination_currency end |
#destination_payment_rail ⇒ Object
Payment rail for sending funds
37 38 39 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 37 def destination_payment_rail @destination_payment_rail end |
#destination_sepa_reference ⇒ Object
Reference for SEPA transactions
46 47 48 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 46 def destination_sepa_reference @destination_sepa_reference end |
#destination_wire_message ⇒ Object
Message for wire transfers
43 44 45 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 43 def end |
#external_account_id ⇒ Object
External bank account to send funds to
28 29 30 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 28 def external_account_id @external_account_id end |
#prefunded_account_id ⇒ Object
Developer’s prefunded account id
31 32 33 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 31 def prefunded_account_id @prefunded_account_id end |
#return_address ⇒ Object
Address to return funds on failed transactions (Not supported on Stellar)
58 59 60 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 58 def return_address @return_address end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
107 108 109 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 107 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
112 113 114 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 112 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 86 def self.attribute_map { :'chain' => :'chain', :'currency' => :'currency', :'address' => :'address', :'external_account_id' => :'external_account_id', :'prefunded_account_id' => :'prefunded_account_id', :'bridge_wallet_id' => :'bridge_wallet_id', :'destination_payment_rail' => :'destination_payment_rail', :'destination_currency' => :'destination_currency', :'destination_wire_message' => :'destination_wire_message', :'destination_sepa_reference' => :'destination_sepa_reference', :'destination_ach_reference' => :'destination_ach_reference', :'destination_address' => :'destination_address', :'destination_blockchain_memo' => :'destination_blockchain_memo', :'return_address' => :'return_address', :'custom_developer_fee_percent' => :'custom_developer_fee_percent' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 450 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
138 139 140 141 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 138 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 117 def self.openapi_types { :'chain' => :'String', :'currency' => :'String', :'address' => :'String', :'external_account_id' => :'String', :'prefunded_account_id' => :'String', :'bridge_wallet_id' => :'String', :'destination_payment_rail' => :'BridgePaymentRail', :'destination_currency' => :'DestinationCurrency', :'destination_wire_message' => :'String', :'destination_sepa_reference' => :'String', :'destination_ach_reference' => :'String', :'destination_address' => :'String', :'destination_blockchain_memo' => :'String', :'return_address' => :'String', :'custom_developer_fee_percent' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 415 def ==(o) return true if self.equal?(o) self.class == o.class && chain == o.chain && currency == o.currency && address == o.address && external_account_id == o.external_account_id && prefunded_account_id == o.prefunded_account_id && bridge_wallet_id == o.bridge_wallet_id && destination_payment_rail == o.destination_payment_rail && destination_currency == o.destination_currency && == o. && destination_sepa_reference == o.destination_sepa_reference && destination_ach_reference == o.destination_ach_reference && destination_address == o.destination_address && destination_blockchain_memo == o.destination_blockchain_memo && return_address == o.return_address && custom_developer_fee_percent == o.custom_developer_fee_percent end |
#eql?(o) ⇒ Boolean
437 438 439 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 437 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
443 444 445 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 443 def hash [chain, currency, address, external_account_id, prefunded_account_id, bridge_wallet_id, destination_payment_rail, destination_currency, , destination_sepa_reference, destination_ach_reference, destination_address, destination_blockchain_memo, return_address, custom_developer_fee_percent].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 228 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @chain.nil? invalid_properties.push('invalid value for "chain", chain cannot be nil.') end if @currency.nil? invalid_properties.push('invalid value for "currency", currency cannot be nil.') end if @address.nil? invalid_properties.push('invalid value for "address", address cannot be nil.') end if !@external_account_id.nil? && @external_account_id.to_s.length > 42 invalid_properties.push('invalid value for "external_account_id", the character length must be smaller than or equal to 42.') end if !@prefunded_account_id.nil? && @prefunded_account_id.to_s.length > 42 invalid_properties.push('invalid value for "prefunded_account_id", the character length must be smaller than or equal to 42.') end if !@bridge_wallet_id.nil? && @bridge_wallet_id.to_s.length > 42 invalid_properties.push('invalid value for "bridge_wallet_id", the character length must be smaller than or equal to 42.') end if !.nil? && .to_s.length > 256 invalid_properties.push('invalid value for "destination_wire_message", the character length must be smaller than or equal to 256.') end if !@destination_sepa_reference.nil? && @destination_sepa_reference.to_s.length > 140 invalid_properties.push('invalid value for "destination_sepa_reference", the character length must be smaller than or equal to 140.') end if !@destination_sepa_reference.nil? && @destination_sepa_reference.to_s.length < 6 invalid_properties.push('invalid value for "destination_sepa_reference", the character length must be greater than or equal to 6.') end if !@destination_ach_reference.nil? && @destination_ach_reference.to_s.length > 10 invalid_properties.push('invalid value for "destination_ach_reference", the character length must be smaller than or equal to 10.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
472 473 474 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 472 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/devdraft/models/create_liquidation_address_dto.rb', line 276 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @chain.nil? chain_validator = EnumAttributeValidator.new('String', ["ethereum", "solana", "polygon", "avalanche_c_chain", "base", "arbitrum", "optimism", "stellar", "tron"]) return false unless chain_validator.valid?(@chain) return false if @currency.nil? currency_validator = EnumAttributeValidator.new('String', ["usdc", "eurc", "dai", "pyusd", "usdt"]) return false unless currency_validator.valid?(@currency) return false if @address.nil? return false if !@external_account_id.nil? && @external_account_id.to_s.length > 42 return false if !@prefunded_account_id.nil? && @prefunded_account_id.to_s.length > 42 return false if !@bridge_wallet_id.nil? && @bridge_wallet_id.to_s.length > 42 return false if !.nil? && .to_s.length > 256 return false if !@destination_sepa_reference.nil? && @destination_sepa_reference.to_s.length > 140 return false if !@destination_sepa_reference.nil? && @destination_sepa_reference.to_s.length < 6 return false if !@destination_ach_reference.nil? && @destination_ach_reference.to_s.length > 10 true end |