Class: CybridApiBank::PostTransferBankModel

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PostTransferBankModel

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
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
294
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 190

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. = attributes[:'external_bank_account_guid']
  end

  if attributes.key?(:'fiat_account_guid')
    self. = attributes[:'fiat_account_guid']
  end

  if attributes.key?(:'send_as_deposit_bank_account_guid')
    self. = 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?(:'security_question')
    self.security_question = attributes[:'security_question']
  end

  if attributes.key?(:'security_answer')
    self.security_answer = attributes[:'security_answer']
  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?(:'sardine_session_guid')
    self.sardine_session_guid = attributes[:'sardine_session_guid']
  end

  if attributes.key?(:'bank_fiat_account_guid')
    self. = attributes[:'bank_fiat_account_guid']
  end

  if attributes.key?(:'customer_fiat_account_guid')
    self. = attributes[:'customer_fiat_account_guid']
  end

  if attributes.key?(:'source_account_guid')
    self. = attributes[:'source_account_guid']
  end

  if attributes.key?(:'destination_account_guid')
    self. = 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. = 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_guidObject

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.



56
57
58
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 56

def 
  
end

#beneficiary_memoObject

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_guidObject

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.



59
60
61
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 59

def 
  
end

#customer_guidObject

The customer's identifier. Required when transfer_type is lightning.



71
72
73
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 71

def customer_guid
  @customer_guid
end

#destination_account_guidObject

The destination account's identifier. Required when transfer_type is book or transfer_type is inter_account.



65
66
67
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 65

def 
  
end

#destination_participantsObject

The destination participants for the transfer. Required when transfer_type is funding, transfer_type is instant_funding, transfer_type is book, transfer_type is crypto, or transfer_type is lightning.



50
51
52
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 50

def destination_participants
  @destination_participants
end

#expected_behavioursObject

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.



77
78
79
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 77

def expected_behaviours
  @expected_behaviours
end

#external_bank_account_guidObject

The customer's 'plaid', 'plaid_processor_token', or 'raw_routing_details' external bank account's identifier. Required for ACH, EFT, WIRE, and RTP payment rails. Not used for e-transfer rail. Required when transfer_type is instant_funding. Optional when transfer_type is funding.



26
27
28
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 26

def 
  
end

#external_wallet_guidObject

The customer's external wallet's identifier. Optional when transfer_type is crypto.



68
69
70
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 68

def external_wallet_guid
  @external_wallet_guid
end

#fiat_account_guidObject

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 
  
end

#labelsObject

The labels associated with the transfer.



80
81
82
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 80

def labels
  @labels
end

#network_fee_account_guidObject

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.



74
75
76
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 74

def 
  
end

#payment_railObject

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_guidObject

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

#sardine_session_guidObject

The GUID of a previously created Sardine session. Used to correlate device signals from the Sardine SDK with the transfer screening. Optional when transfer_type is funding or transfer_type is instant_funding.



53
54
55
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 53

def sardine_session_guid
  @sardine_session_guid
end

#security_answerObject

The security answer the recipient must provide to claim an Interac E-Transfer. Only accepted for e-transfer rail withdrawals; must be paired with security_question. Optional when transfer_type is funding.



44
45
46
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 44

def security_answer
  @security_answer
end

#security_questionObject

The security question to send with an Interac E-Transfer withdrawal. Only accepted for e-transfer rail withdrawals; must be paired with security_answer. Optional when transfer_type is funding.



41
42
43
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 41

def security_question
  @security_question
end

#send_as_deposit_bank_account_guidObject

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 
  
end

#source_account_guidObject

The source account's identifier. Required when transfer_type is book or transfer_type is inter_account.



62
63
64
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 62

def 
  
end

#source_participantsObject

The source participants for the transfer. Required when transfer_type is funding, transfer_type is instant_funding, transfer_type is book, transfer_type is crypto, or transfer_type is lightning.



47
48
49
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 47

def source_participants
  @source_participants
end

#transfer_typeObject

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_attributesObject

Returns all the JSON keys this model knows about



132
133
134
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 132

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 105

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',
    :'security_question' => :'security_question',
    :'security_answer' => :'security_answer',
    :'source_participants' => :'source_participants',
    :'destination_participants' => :'destination_participants',
    :'sardine_session_guid' => :'sardine_session_guid',
    :'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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



686
687
688
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 686

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 164

def self.openapi_nullable
  Set.new([
    :'external_bank_account_guid',
    :'fiat_account_guid',
    :'send_as_deposit_bank_account_guid',
    :'payment_rail',
    :'beneficiary_memo',
    :'security_question',
    :'security_answer',
    :'source_participants',
    :'destination_participants',
    :'sardine_session_guid',
    :'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_typesObject

Attribute type mapping.



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 137

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',
    :'security_question' => :'String',
    :'security_answer' => :'String',
    :'source_participants' => :'Array<PostTransferParticipantBankModel>',
    :'destination_participants' => :'Array<PostTransferParticipantBankModel>',
    :'sardine_session_guid' => :'String',
    :'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.

Parameters:

  • Object (Object)

    to be compared



645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 645

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      quote_guid == o.quote_guid &&
      transfer_type == o.transfer_type &&
       == o. &&
       == o. &&
       == o. &&
      payment_rail == o.payment_rail &&
      beneficiary_memo == o.beneficiary_memo &&
      security_question == o.security_question &&
      security_answer == o.security_answer &&
      source_participants == o.source_participants &&
      destination_participants == o.destination_participants &&
      sardine_session_guid == o.sardine_session_guid &&
       == o. &&
       == o. &&
       == o. &&
       == o. &&
      external_wallet_guid == o.external_wallet_guid &&
      customer_guid == o.customer_guid &&
       == o. &&
      expected_behaviours == o.expected_behaviours &&
      labels == o.labels
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 717

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



788
789
790
791
792
793
794
795
796
797
798
799
800
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 788

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 693

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


673
674
675
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 673

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



679
680
681
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 679

def hash
  [quote_guid, transfer_type, , , , payment_rail, beneficiary_memo, security_question, security_answer, source_participants, destination_participants, sardine_session_guid, , , , , external_wallet_guid, customer_guid, , expected_behaviours, labels].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
352
353
354
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
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 298

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 !.nil? && .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 !.nil? && .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 !.nil? && .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 !@security_question.nil? && @security_question.to_s.length > 40
    invalid_properties.push('invalid value for "security_question", the character length must be smaller than or equal to 40.')
  end

  if !@security_answer.nil? && @security_answer.to_s.length > 25
    invalid_properties.push('invalid value for "security_answer", the character length must be smaller than or equal to 25.')
  end

  if !@source_participants.nil? && @source_participants.length > 100
    invalid_properties.push('invalid value for "source_participants", number of items must be less than or equal to 100.')
  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 > 100
    invalid_properties.push('invalid value for "destination_participants", number of items must be less than or equal to 100.')
  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 !@sardine_session_guid.nil? && @sardine_session_guid.to_s.length > 32
    invalid_properties.push('invalid value for "sardine_session_guid", the character length must be smaller than or equal to 32.')
  end

  if !@sardine_session_guid.nil? && @sardine_session_guid.to_s.length < 32
    invalid_properties.push('invalid value for "sardine_session_guid", the character length must be great than or equal to 32.')
  end

  if !.nil? && .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 !.nil? && .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 !.nil? && .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 !.nil? && .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 !.nil? && .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_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



764
765
766
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 764

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



770
771
772
773
774
775
776
777
778
779
780
781
782
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 770

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



758
759
760
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 758

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb', line 401

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 !.nil? && .to_s.length > 32
  return false if !.nil? && .to_s.length > 32
  return false if !.nil? && .to_s.length > 32
  payment_rail_validator = EnumAttributeValidator.new('String', ["ach", "eft", "wire", "rtp", "etransfer"])
  return false unless payment_rail_validator.valid?(@payment_rail)
  return false if !@security_question.nil? && @security_question.to_s.length > 40
  return false if !@security_answer.nil? && @security_answer.to_s.length > 25
  return false if !@source_participants.nil? && @source_participants.length > 100
  return false if !@source_participants.nil? && @source_participants.length < 0
  return false if !@destination_participants.nil? && @destination_participants.length > 100
  return false if !@destination_participants.nil? && @destination_participants.length < 0
  return false if !@sardine_session_guid.nil? && @sardine_session_guid.to_s.length > 32
  return false if !@sardine_session_guid.nil? && @sardine_session_guid.to_s.length < 32
  return false if !.nil? && .to_s.length > 32
  return false if !.nil? && .to_s.length > 32
  return false if !.nil? && .to_s.length > 32
  return false if !.nil? && .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 !.nil? && .to_s.length > 32
  return false if !@expected_behaviours.nil? && @expected_behaviours.length > 50
  return false if !@labels.nil? && @labels.length > 8
  true
end