Class: CybridApiBank::PostTransferBankModel
- Inherits:
-
Object
- Object
- CybridApiBank::PostTransferBankModel
- Defined in:
- lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb
Overview
Request body for transfer creation.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#bank_fiat_account_guid ⇒ Object
The identifier for the fiat account to use for the transfer.
-
#beneficiary_memo ⇒ Object
The memo to send to the counterparty.
-
#customer_fiat_account_guid ⇒ Object
The identifier for the fiat account to use for the transfer.
-
#customer_guid ⇒ Object
The customer’s identifier.
-
#destination_account_guid ⇒ Object
The destination account’s identifier.
-
#destination_participants ⇒ Object
The destination participants for the transfer.
-
#expected_behaviours ⇒ Object
The optional expected behaviour to simulate.
-
#external_bank_account_guid ⇒ Object
The customer’s ‘plaid’ or ‘plaid_processor_token’ external bank account’s identifier.
-
#external_wallet_guid ⇒ Object
The customer’s external wallet’s identifier.
-
#fiat_account_guid ⇒ Object
The identifier for the fiat account to use for the transfer.
-
#labels ⇒ Object
The labels associated with the transfer.
-
#network_fee_account_guid ⇒ Object
The network fee account’s identifier.
-
#payment_rail ⇒ Object
The desired payment rail to initiate the transfer for.
-
#quote_guid ⇒ Object
The associated quote’s identifier.
-
#send_as_deposit_bank_account_guid ⇒ Object
The deposit bank account’s identifier.
-
#source_account_guid ⇒ Object
The source account’s identifier.
-
#source_participants ⇒ Object
The source participants for the transfer.
-
#transfer_type ⇒ Object
The type of transfer.
Class Method Summary collapse
-
.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.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PostTransferBankModel
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ PostTransferBankModel
Initializes the object
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 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 172 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `CybridApiBank::PostTransferBankModel` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `CybridApiBank::PostTransferBankModel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'quote_guid') self.quote_guid = attributes[:'quote_guid'] end if attributes.key?(:'transfer_type') self.transfer_type = attributes[:'transfer_type'] end if attributes.key?(:'external_bank_account_guid') self.external_bank_account_guid = attributes[:'external_bank_account_guid'] end if attributes.key?(:'fiat_account_guid') self.fiat_account_guid = attributes[:'fiat_account_guid'] end if attributes.key?(:'send_as_deposit_bank_account_guid') self.send_as_deposit_bank_account_guid = attributes[:'send_as_deposit_bank_account_guid'] end if attributes.key?(:'payment_rail') self.payment_rail = attributes[:'payment_rail'] end if attributes.key?(:'beneficiary_memo') self.beneficiary_memo = attributes[:'beneficiary_memo'] end if attributes.key?(:'source_participants') if (value = attributes[:'source_participants']).is_a?(Array) self.source_participants = value end end if attributes.key?(:'destination_participants') if (value = attributes[:'destination_participants']).is_a?(Array) self.destination_participants = value end end if attributes.key?(:'bank_fiat_account_guid') self.bank_fiat_account_guid = attributes[:'bank_fiat_account_guid'] end if attributes.key?(:'customer_fiat_account_guid') self.customer_fiat_account_guid = attributes[:'customer_fiat_account_guid'] end if attributes.key?(:'source_account_guid') self.source_account_guid = attributes[:'source_account_guid'] end if attributes.key?(:'destination_account_guid') self.destination_account_guid = attributes[:'destination_account_guid'] end if attributes.key?(:'external_wallet_guid') self.external_wallet_guid = attributes[:'external_wallet_guid'] end if attributes.key?(:'customer_guid') self.customer_guid = attributes[:'customer_guid'] end if attributes.key?(:'network_fee_account_guid') self.network_fee_account_guid = attributes[:'network_fee_account_guid'] end if attributes.key?(:'expected_behaviours') if (value = attributes[:'expected_behaviours']).is_a?(Array) self.expected_behaviours = value end end if attributes.key?(:'labels') if (value = attributes[:'labels']).is_a?(Array) self.labels = value end end end |
Instance Attribute Details
#bank_fiat_account_guid ⇒ Object
The identifier for the fiat account to use for the transfer. Required if the bank has multiple fiat accounts. Optional when transfer_type is instant_funding or transfer_type is lightning.
47 48 49 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 47 def bank_fiat_account_guid @bank_fiat_account_guid end |
#beneficiary_memo ⇒ Object
The memo to send to the counterparty. Optional when transfer_type is funding.
38 39 40 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 38 def beneficiary_memo @beneficiary_memo end |
#customer_fiat_account_guid ⇒ Object
The identifier for the fiat account to use for the transfer. Required if the customer has multiple fiat accounts. Optional when transfer_type is instant_funding or transfer_type is lightning.
50 51 52 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 50 def customer_fiat_account_guid @customer_fiat_account_guid end |
#customer_guid ⇒ Object
The customer’s identifier. Required when transfer_type is lightning.
62 63 64 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 62 def customer_guid @customer_guid end |
#destination_account_guid ⇒ Object
The destination account’s identifier. Required when transfer_type is book or transfer_type is inter_account.
56 57 58 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 56 def destination_account_guid @destination_account_guid end |
#destination_participants ⇒ Object
The destination participants for the transfer. Optional when transfer_type is funding, transfer_type is instant_funding, transfer_type is book, transfer_type is crypto, or transfer_type is lightning.
44 45 46 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 44 def destination_participants @destination_participants end |
#expected_behaviours ⇒ Object
The optional expected behaviour to simulate. Only applicable for transfers under sandbox banks. The force_review behaviour will force the transfer to be reviewed for funding and instant_funding transfers.
68 69 70 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 68 def expected_behaviours @expected_behaviours end |
#external_bank_account_guid ⇒ Object
The customer’s ‘plaid’ or ‘plaid_processor_token’ external bank account’s identifier. Required when transfer_type is funding or transfer_type is instant_funding.
26 27 28 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 26 def external_bank_account_guid @external_bank_account_guid end |
#external_wallet_guid ⇒ Object
The customer’s external wallet’s identifier. Optional when transfer_type is crypto.
59 60 61 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 59 def external_wallet_guid @external_wallet_guid end |
#fiat_account_guid ⇒ Object
The identifier for the fiat account to use for the transfer. Required if the customer or bank has multiple fiat accounts. Optional when transfer_type is funding.
29 30 31 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 29 def fiat_account_guid @fiat_account_guid end |
#labels ⇒ Object
The labels associated with the transfer.
71 72 73 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 71 def labels @labels end |
#network_fee_account_guid ⇒ Object
The network fee account’s identifier. Required for network fee transfers. Must be the identifier for the customer’s or bank’s fiat or trading account. For customer’s to pay the network fees, include the customer’s fiat or trading account guid. For bank’s to pay the network fees, include the bank’s fiat or trading account guid. Required when transfer_type is lightning.
65 66 67 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 65 def network_fee_account_guid @network_fee_account_guid end |
#payment_rail ⇒ Object
The desired payment rail to initiate the transfer for. Optional when transfer_type is funding.
35 36 37 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 35 def payment_rail @payment_rail end |
#quote_guid ⇒ Object
The associated quote’s identifier.
20 21 22 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 20 def quote_guid @quote_guid end |
#send_as_deposit_bank_account_guid ⇒ Object
The deposit bank account’s identifier. Only valid for withdrawals. The deposit bank account must be owned by the customer or bank initiating the transfer. Optional when transfer_type is funding.
32 33 34 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 32 def send_as_deposit_bank_account_guid @send_as_deposit_bank_account_guid end |
#source_account_guid ⇒ Object
The source account’s identifier. Required when transfer_type is book or transfer_type is inter_account.
53 54 55 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 53 def source_account_guid @source_account_guid end |
#source_participants ⇒ Object
The source participants for the transfer. Optional when transfer_type is funding, transfer_type is instant_funding, transfer_type is book, transfer_type is crypto, or transfer_type is lightning.
41 42 43 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 41 def source_participants @source_participants end |
#transfer_type ⇒ Object
The type of transfer.
23 24 25 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 23 def transfer_type @transfer_type end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
120 121 122 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 120 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 96 def self.attribute_map { :'quote_guid' => :'quote_guid', :'transfer_type' => :'transfer_type', :'external_bank_account_guid' => :'external_bank_account_guid', :'fiat_account_guid' => :'fiat_account_guid', :'send_as_deposit_bank_account_guid' => :'send_as_deposit_bank_account_guid', :'payment_rail' => :'payment_rail', :'beneficiary_memo' => :'beneficiary_memo', :'source_participants' => :'source_participants', :'destination_participants' => :'destination_participants', :'bank_fiat_account_guid' => :'bank_fiat_account_guid', :'customer_fiat_account_guid' => :'customer_fiat_account_guid', :'source_account_guid' => :'source_account_guid', :'destination_account_guid' => :'destination_account_guid', :'external_wallet_guid' => :'external_wallet_guid', :'customer_guid' => :'customer_guid', :'network_fee_account_guid' => :'network_fee_account_guid', :'expected_behaviours' => :'expected_behaviours', :'labels' => :'labels' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
599 600 601 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 599 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 149 def self.openapi_nullable Set.new([ :'external_bank_account_guid', :'fiat_account_guid', :'send_as_deposit_bank_account_guid', :'payment_rail', :'beneficiary_memo', :'source_participants', :'destination_participants', :'bank_fiat_account_guid', :'customer_fiat_account_guid', :'source_account_guid', :'destination_account_guid', :'external_wallet_guid', :'customer_guid', :'network_fee_account_guid', :'expected_behaviours', :'labels' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 125 def self.openapi_types { :'quote_guid' => :'String', :'transfer_type' => :'String', :'external_bank_account_guid' => :'String', :'fiat_account_guid' => :'String', :'send_as_deposit_bank_account_guid' => :'String', :'payment_rail' => :'String', :'beneficiary_memo' => :'String', :'source_participants' => :'Array<PostTransferParticipantBankModel>', :'destination_participants' => :'Array<PostTransferParticipantBankModel>', :'bank_fiat_account_guid' => :'String', :'customer_fiat_account_guid' => :'String', :'source_account_guid' => :'String', :'destination_account_guid' => :'String', :'external_wallet_guid' => :'String', :'customer_guid' => :'String', :'network_fee_account_guid' => :'String', :'expected_behaviours' => :'Array<String>', :'labels' => :'Array<String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 561 def ==(o) return true if self.equal?(o) self.class == o.class && quote_guid == o.quote_guid && transfer_type == o.transfer_type && external_bank_account_guid == o.external_bank_account_guid && fiat_account_guid == o.fiat_account_guid && send_as_deposit_bank_account_guid == o.send_as_deposit_bank_account_guid && payment_rail == o.payment_rail && beneficiary_memo == o.beneficiary_memo && source_participants == o.source_participants && destination_participants == o.destination_participants && bank_fiat_account_guid == o.bank_fiat_account_guid && customer_fiat_account_guid == o.customer_fiat_account_guid && source_account_guid == o.source_account_guid && destination_account_guid == o.destination_account_guid && external_wallet_guid == o.external_wallet_guid && customer_guid == o.customer_guid && network_fee_account_guid == o.network_fee_account_guid && expected_behaviours == o.expected_behaviours && labels == o.labels end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 630 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = CybridApiBank.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
701 702 703 704 705 706 707 708 709 710 711 712 713 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 701 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 606 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{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[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
586 587 588 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 586 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
592 593 594 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 592 def hash [quote_guid, transfer_type, external_bank_account_guid, fiat_account_guid, send_as_deposit_bank_account_guid, payment_rail, beneficiary_memo, source_participants, destination_participants, bank_fiat_account_guid, customer_fiat_account_guid, source_account_guid, destination_account_guid, external_wallet_guid, customer_guid, network_fee_account_guid, expected_behaviours, labels].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 268 def list_invalid_properties invalid_properties = Array.new if @quote_guid.nil? invalid_properties.push('invalid value for "quote_guid", quote_guid cannot be nil.') end if @quote_guid.to_s.length > 32 invalid_properties.push('invalid value for "quote_guid", the character length must be smaller than or equal to 32.') end if @quote_guid.to_s.length < 32 invalid_properties.push('invalid value for "quote_guid", the character length must be great than or equal to 32.') end if @transfer_type.nil? invalid_properties.push('invalid value for "transfer_type", transfer_type cannot be nil.') end if !@external_bank_account_guid.nil? && @external_bank_account_guid.to_s.length > 32 invalid_properties.push('invalid value for "external_bank_account_guid", the character length must be smaller than or equal to 32.') end if !@fiat_account_guid.nil? && @fiat_account_guid.to_s.length > 32 invalid_properties.push('invalid value for "fiat_account_guid", the character length must be smaller than or equal to 32.') end if !@send_as_deposit_bank_account_guid.nil? && @send_as_deposit_bank_account_guid.to_s.length > 32 invalid_properties.push('invalid value for "send_as_deposit_bank_account_guid", the character length must be smaller than or equal to 32.') end if !@source_participants.nil? && @source_participants.length > 50 invalid_properties.push('invalid value for "source_participants", number of items must be less than or equal to 50.') end if !@source_participants.nil? && @source_participants.length < 0 invalid_properties.push('invalid value for "source_participants", number of items must be greater than or equal to 0.') end if !@destination_participants.nil? && @destination_participants.length > 50 invalid_properties.push('invalid value for "destination_participants", number of items must be less than or equal to 50.') end if !@destination_participants.nil? && @destination_participants.length < 0 invalid_properties.push('invalid value for "destination_participants", number of items must be greater than or equal to 0.') end if !@bank_fiat_account_guid.nil? && @bank_fiat_account_guid.to_s.length > 32 invalid_properties.push('invalid value for "bank_fiat_account_guid", the character length must be smaller than or equal to 32.') end if !@customer_fiat_account_guid.nil? && @customer_fiat_account_guid.to_s.length > 32 invalid_properties.push('invalid value for "customer_fiat_account_guid", the character length must be smaller than or equal to 32.') end if !@source_account_guid.nil? && @source_account_guid.to_s.length > 32 invalid_properties.push('invalid value for "source_account_guid", the character length must be smaller than or equal to 32.') end if !@destination_account_guid.nil? && @destination_account_guid.to_s.length > 32 invalid_properties.push('invalid value for "destination_account_guid", the character length must be smaller than or equal to 32.') end if !@external_wallet_guid.nil? && @external_wallet_guid.to_s.length > 32 invalid_properties.push('invalid value for "external_wallet_guid", the character length must be smaller than or equal to 32.') end if !@customer_guid.nil? && @customer_guid.to_s.length > 32 invalid_properties.push('invalid value for "customer_guid", the character length must be smaller than or equal to 32.') end if !@network_fee_account_guid.nil? && @network_fee_account_guid.to_s.length > 32 invalid_properties.push('invalid value for "network_fee_account_guid", the character length must be smaller than or equal to 32.') end if !@expected_behaviours.nil? && @expected_behaviours.length > 50 invalid_properties.push('invalid value for "expected_behaviours", number of items must be less than or equal to 50.') end if !@labels.nil? && @labels.length > 8 invalid_properties.push('invalid value for "labels", number of items must be less than or equal to 8.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
677 678 679 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 677 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
683 684 685 686 687 688 689 690 691 692 693 694 695 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 683 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 |
#to_s ⇒ String
Returns the string representation of the object
671 672 673 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 671 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 355 def valid? return false if @quote_guid.nil? return false if @quote_guid.to_s.length > 32 return false if @quote_guid.to_s.length < 32 return false if @transfer_type.nil? transfer_type_validator = EnumAttributeValidator.new('String', ["funding", "book", "crypto", "instant_funding", "inter_account", "lightning"]) return false unless transfer_type_validator.valid?(@transfer_type) return false if !@external_bank_account_guid.nil? && @external_bank_account_guid.to_s.length > 32 return false if !@fiat_account_guid.nil? && @fiat_account_guid.to_s.length > 32 return false if !@send_as_deposit_bank_account_guid.nil? && @send_as_deposit_bank_account_guid.to_s.length > 32 payment_rail_validator = EnumAttributeValidator.new('String', ["ach", "eft", "wire", "rtp"]) return false unless payment_rail_validator.valid?(@payment_rail) return false if !@source_participants.nil? && @source_participants.length > 50 return false if !@source_participants.nil? && @source_participants.length < 0 return false if !@destination_participants.nil? && @destination_participants.length > 50 return false if !@destination_participants.nil? && @destination_participants.length < 0 return false if !@bank_fiat_account_guid.nil? && @bank_fiat_account_guid.to_s.length > 32 return false if !@customer_fiat_account_guid.nil? && @customer_fiat_account_guid.to_s.length > 32 return false if !@source_account_guid.nil? && @source_account_guid.to_s.length > 32 return false if !@destination_account_guid.nil? && @destination_account_guid.to_s.length > 32 return false if !@external_wallet_guid.nil? && @external_wallet_guid.to_s.length > 32 return false if !@customer_guid.nil? && @customer_guid.to_s.length > 32 return false if !@network_fee_account_guid.nil? && @network_fee_account_guid.to_s.length > 32 return false if !@expected_behaviours.nil? && @expected_behaviours.length > 50 return false if !@labels.nil? && @labels.length > 8 true end |