Class: Devdraft::CreateBankPaymentIntentDto
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Devdraft::CreateBankPaymentIntentDto
- Defined in:
- lib/devdraft/models/create_bank_payment_intent_dto.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#ach_reference ⇒ Object
ACH reference (for ACH transfers).
-
#amount ⇒ Object
Payment amount (optional for flexible amount).
-
#customer_address ⇒ Object
Customer address.
-
#customer_country ⇒ Object
Customer country.
-
#customer_country_iso ⇒ Object
Customer country ISO code.
-
#customer_email ⇒ Object
Customer email address.
-
#customer_first_name ⇒ Object
Customer first name.
-
#customer_last_name ⇒ Object
Customer last name.
-
#customer_province ⇒ Object
Customer province/state.
-
#customer_province_iso ⇒ Object
Customer province/state ISO code.
-
#destination_address ⇒ Object
Destination wallet address.
-
#destination_currency ⇒ Object
The stablecoin currency to convert TO.
-
#destination_network ⇒ Object
The blockchain network where the stablecoin will be delivered.
-
#phone_number ⇒ Object
Customer phone number.
-
#sepa_reference ⇒ Object
SEPA reference (for SEPA transfers).
-
#source_currency ⇒ Object
The fiat currency to convert FROM.
-
#source_payment_rail ⇒ Object
The banking payment method to use for the transfer.
-
#wire_message ⇒ Object
Wire transfer message (for WIRE transfers).
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 = {}) ⇒ CreateBankPaymentIntentDto
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 = {}) ⇒ CreateBankPaymentIntentDto
Initializes the object
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 225 226 227 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 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 160 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::CreateBankPaymentIntentDto` 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::CreateBankPaymentIntentDto`. 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?(:'source_payment_rail') self.source_payment_rail = attributes[:'source_payment_rail'] else self.source_payment_rail = nil end if attributes.key?(:'source_currency') self.source_currency = attributes[:'source_currency'] else self.source_currency = nil end if attributes.key?(:'destination_currency') self.destination_currency = attributes[:'destination_currency'] else self.destination_currency = nil end if attributes.key?(:'destination_network') self.destination_network = attributes[:'destination_network'] else self.destination_network = nil end if attributes.key?(:'destination_address') self.destination_address = attributes[:'destination_address'] end if attributes.key?(:'amount') self.amount = attributes[:'amount'] end if attributes.key?(:'customer_first_name') self.customer_first_name = attributes[:'customer_first_name'] end if attributes.key?(:'customer_last_name') self.customer_last_name = attributes[:'customer_last_name'] end if attributes.key?(:'customer_email') self.customer_email = attributes[:'customer_email'] end if attributes.key?(:'customer_address') self.customer_address = attributes[:'customer_address'] end if attributes.key?(:'customer_country') self.customer_country = attributes[:'customer_country'] end if attributes.key?(:'customer_country_iso') self.customer_country_iso = attributes[:'customer_country_iso'] end if attributes.key?(:'customer_province') self.customer_province = attributes[:'customer_province'] end if attributes.key?(:'customer_province_iso') self.customer_province_iso = attributes[:'customer_province_iso'] end if attributes.key?(:'phone_number') self.phone_number = attributes[:'phone_number'] end if attributes.key?(:'wire_message') self. = attributes[:'wire_message'] end if attributes.key?(:'sepa_reference') self.sepa_reference = attributes[:'sepa_reference'] end if attributes.key?(:'ach_reference') self.ach_reference = attributes[:'ach_reference'] end end |
Instance Attribute Details
#ach_reference ⇒ Object
ACH reference (for ACH transfers)
70 71 72 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 70 def ach_reference @ach_reference end |
#amount ⇒ Object
Payment amount (optional for flexible amount)
34 35 36 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 34 def amount @amount end |
#customer_address ⇒ Object
Customer address
46 47 48 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 46 def customer_address @customer_address end |
#customer_country ⇒ Object
Customer country
49 50 51 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 49 def customer_country @customer_country end |
#customer_country_iso ⇒ Object
Customer country ISO code
52 53 54 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 52 def customer_country_iso @customer_country_iso end |
#customer_email ⇒ Object
Customer email address
43 44 45 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 43 def customer_email @customer_email end |
#customer_first_name ⇒ Object
Customer first name
37 38 39 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 37 def customer_first_name @customer_first_name end |
#customer_last_name ⇒ Object
Customer last name
40 41 42 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 40 def customer_last_name @customer_last_name end |
#customer_province ⇒ Object
Customer province/state
55 56 57 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 55 def customer_province @customer_province end |
#customer_province_iso ⇒ Object
Customer province/state ISO code
58 59 60 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 58 def customer_province_iso @customer_province_iso end |
#destination_address ⇒ Object
Destination wallet address. Supports Ethereum (0x…) and Solana address formats.
31 32 33 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 31 def destination_address @destination_address end |
#destination_currency ⇒ Object
The stablecoin currency to convert TO. The customer will receive this currency.
25 26 27 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 25 def destination_currency @destination_currency end |
#destination_network ⇒ Object
The blockchain network where the stablecoin will be delivered. Must support the destination currency.
28 29 30 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 28 def destination_network @destination_network end |
#phone_number ⇒ Object
Customer phone number
61 62 63 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 61 def phone_number @phone_number end |
#sepa_reference ⇒ Object
SEPA reference (for SEPA transfers)
67 68 69 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 67 def sepa_reference @sepa_reference end |
#source_currency ⇒ Object
The fiat currency to convert FROM. Must match the currency of the source payment rail.
22 23 24 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 22 def source_currency @source_currency end |
#source_payment_rail ⇒ Object
The banking payment method to use for the transfer. Determines processing time and fees.
19 20 21 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 19 def source_payment_rail @source_payment_rail end |
#wire_message ⇒ Object
Wire transfer message (for WIRE transfers)
64 65 66 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 64 def end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
119 120 121 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 119 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
124 125 126 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 124 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 95 def self.attribute_map { :'source_payment_rail' => :'sourcePaymentRail', :'source_currency' => :'sourceCurrency', :'destination_currency' => :'destinationCurrency', :'destination_network' => :'destinationNetwork', :'destination_address' => :'destinationAddress', :'amount' => :'amount', :'customer_first_name' => :'customer_first_name', :'customer_last_name' => :'customer_last_name', :'customer_email' => :'customer_email', :'customer_address' => :'customer_address', :'customer_country' => :'customer_country', :'customer_country_iso' => :'customer_countryISO', :'customer_province' => :'customer_province', :'customer_province_iso' => :'customer_provinceISO', :'phone_number' => :'phoneNumber', :'wire_message' => :'wire_message', :'sepa_reference' => :'sepa_reference', :'ach_reference' => :'ach_reference' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 436 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
153 154 155 156 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 153 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 129 def self.openapi_types { :'source_payment_rail' => :'BridgePaymentRail', :'source_currency' => :'FiatCurrency', :'destination_currency' => :'StableCoinCurrency', :'destination_network' => :'BridgePaymentRail', :'destination_address' => :'String', :'amount' => :'String', :'customer_first_name' => :'String', :'customer_last_name' => :'String', :'customer_email' => :'String', :'customer_address' => :'String', :'customer_country' => :'String', :'customer_country_iso' => :'String', :'customer_province' => :'String', :'customer_province_iso' => :'String', :'phone_number' => :'String', :'wire_message' => :'String', :'sepa_reference' => :'String', :'ach_reference' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 398 def ==(o) return true if self.equal?(o) self.class == o.class && source_payment_rail == o.source_payment_rail && source_currency == o.source_currency && destination_currency == o.destination_currency && destination_network == o.destination_network && destination_address == o.destination_address && amount == o.amount && customer_first_name == o.customer_first_name && customer_last_name == o.customer_last_name && customer_email == o.customer_email && customer_address == o.customer_address && customer_country == o.customer_country && customer_country_iso == o.customer_country_iso && customer_province == o.customer_province && customer_province_iso == o.customer_province_iso && phone_number == o.phone_number && == o. && sepa_reference == o.sepa_reference && ach_reference == o.ach_reference end |
#eql?(o) ⇒ Boolean
423 424 425 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 423 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
429 430 431 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 429 def hash [source_payment_rail, source_currency, destination_currency, destination_network, destination_address, amount, customer_first_name, customer_last_name, customer_email, customer_address, customer_country, customer_country_iso, customer_province, customer_province_iso, phone_number, , sepa_reference, ach_reference].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 257 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @source_payment_rail.nil? invalid_properties.push('invalid value for "source_payment_rail", source_payment_rail cannot be nil.') end if @source_currency.nil? invalid_properties.push('invalid value for "source_currency", source_currency cannot be nil.') end if @destination_currency.nil? invalid_properties.push('invalid value for "destination_currency", destination_currency cannot be nil.') end if @destination_network.nil? invalid_properties.push('invalid value for "destination_network", destination_network cannot be nil.') end if !.nil? && .to_s.length > 256 invalid_properties.push('invalid value for "wire_message", the character length must be smaller than or equal to 256.') end if !@sepa_reference.nil? && @sepa_reference.to_s.length > 140 invalid_properties.push('invalid value for "sepa_reference", the character length must be smaller than or equal to 140.') end if !@sepa_reference.nil? && @sepa_reference.to_s.length < 6 invalid_properties.push('invalid value for "sepa_reference", the character length must be greater than or equal to 6.') end if !@ach_reference.nil? && @ach_reference.to_s.length > 10 invalid_properties.push('invalid value for "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
458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 458 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
297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/devdraft/models/create_bank_payment_intent_dto.rb', line 297 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @source_payment_rail.nil? return false if @source_currency.nil? return false if @destination_currency.nil? return false if @destination_network.nil? return false if !.nil? && .to_s.length > 256 return false if !@sepa_reference.nil? && @sepa_reference.to_s.length > 140 return false if !@sepa_reference.nil? && @sepa_reference.to_s.length < 6 return false if !@ach_reference.nil? && @ach_reference.to_s.length > 10 true end |