Class: CityPayApiClient::AuthReference

Inherits:
Object
  • Object
show all
Defined in:
lib/citypay_api_client/models/auth_reference.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AuthReference

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
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
# File 'lib/citypay_api_client/models/auth_reference.rb', line 222

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `CityPayApiClient::AuthReference` 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 `CityPayApiClient::AuthReference`. 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?(:'address')
    self.address = attributes[:'address']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.key?(:'meta')
    if (value = attributes[:'meta']).is_a?(Hash)
      self.meta = value
    end
  end

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#addressObject

The address of the card holder.



19
20
21
# File 'lib/citypay_api_client/models/auth_reference.rb', line 19

def address
  @address
end

#amountObject

The amount of the transaction in decimal currency format.



22
23
24
# File 'lib/citypay_api_client/models/auth_reference.rb', line 22

def amount
  @amount
end

#amount_valueObject

The amount of the transaction in integer/request format.



25
26
27
# File 'lib/citypay_api_client/models/auth_reference.rb', line 25

def amount_value
  @amount_value
end

#atrnObject

A reference number provided by the acquiring services.



28
29
30
# File 'lib/citypay_api_client/models/auth_reference.rb', line 28

def atrn
  @atrn
end

#authcodeObject

The authorisation code of the transaction returned by the acquirer or card issuer.



31
32
33
# File 'lib/citypay_api_client/models/auth_reference.rb', line 31

def authcode
  @authcode
end

#authen_resultObject

The authentication result if an ecommerce transaction. ‘Y’. Authentication Successful, ‘N’. Authentication Failed, ‘A’. Attempts Processing Performed, ‘U’. Authentication Could Not Be Performed, ‘C’. Challenge Required.



34
35
36
# File 'lib/citypay_api_client/models/auth_reference.rb', line 34

def authen_result
  @authen_result
end

#batchnoObject

A batch number which the transaction has been end of day batched towards.



37
38
39
# File 'lib/citypay_api_client/models/auth_reference.rb', line 37

def batchno
  @batchno
end

#bin_commercialObject

Whether the card is a commercial card.



40
41
42
# File 'lib/citypay_api_client/models/auth_reference.rb', line 40

def bin_commercial
  @bin_commercial
end

#bin_consumerObject

Whether the card is a consumer card.



43
44
45
# File 'lib/citypay_api_client/models/auth_reference.rb', line 43

def bin_consumer
  @bin_consumer
end

#bin_corporateObject

Whether the card is a corporate card.



46
47
48
# File 'lib/citypay_api_client/models/auth_reference.rb', line 46

def bin_corporate
  @bin_corporate
end

#bin_creditObject

Whether the card is a credit card.



49
50
51
# File 'lib/citypay_api_client/models/auth_reference.rb', line 49

def bin_credit
  @bin_credit
end

#bin_debitObject

Whether the card is a debit card.



52
53
54
# File 'lib/citypay_api_client/models/auth_reference.rb', line 52

def bin_debit
  @bin_debit
end

#cardholder_agreementObject

Merchant-initiated transactions (MITs) are payments you trigger, where the cardholder has previously consented to you carrying out such payments. These may be scheduled (such as recurring payments and installments) or unscheduled (like account top-ups triggered by balance thresholds and no-show charges). Scheduled These are regular payments using stored card details, like installments or a monthly subscription fee. - ‘I` Instalment - A single purchase of goods or services billed to a cardholder in multiple transactions, over a period of time agreed by the cardholder and you. - `R` Recurring - Transactions processed at fixed, regular intervals not to exceed one year between transactions, representing an agreement between a cardholder and you to purchase goods or services provided over a period of time. Unscheduled These are payments using stored card details that do not occur on a regular schedule, like top-ups for a digital wallet triggered by the balance falling below a certain threshold. - `A` Reauthorisation - a purchase made after the original purchase. A common scenario is delayed/split shipments. - `C` Unscheduled Payment - A transaction using a stored credential for a fixed or variable amount that does not occur on a scheduled or regularly occurring transaction date. This includes account top-ups triggered by balance thresholds. - `D` Delayed Charge - A delayed charge is typically used in hotel, cruise lines and vehicle rental environments to perform a supplemental account charge after original services are rendered. - `L` Incremental - An incremental authorisation is typically found in hotel and car rental environments, where the cardholder has agreed to pay for any service incurred during the duration of the contract. An incremental authorisation is where you need to seek authorisation of further funds in addition to what you have originally requested. A common scenario is additional services charged to the contract, such as extending a stay in a hotel. - `S` Resubmission - When the original purchase occurred, but you were not able to get authorisation at the time the goods or services were provided. It should be only used where the goods or services have already been provided, but the authorisation request is declined for insufficient funds. - `X` No-show - A no-show is a transaction where you are enabled to charge for services which the cardholder entered into an agreement to purchase, but the cardholder did not meet the terms of the agreement. - `N` Not Applicable - For all other transactions the value will be not applicable.



55
56
57
# File 'lib/citypay_api_client/models/auth_reference.rb', line 55

def cardholder_agreement
  @cardholder_agreement
end

#currencyObject

The currency of the transaction in ISO 4217 code format.



58
59
60
# File 'lib/citypay_api_client/models/auth_reference.rb', line 58

def currency
  @currency
end

#datetimeObject

The date and time of the transaction.



61
62
63
# File 'lib/citypay_api_client/models/auth_reference.rb', line 61

def datetime
  @datetime
end

#eciObject

The ECI if an ecommerce transaction.



64
65
66
# File 'lib/citypay_api_client/models/auth_reference.rb', line 64

def eci
  @eci
end

#emailObject

The email address of the card holder.



67
68
69
# File 'lib/citypay_api_client/models/auth_reference.rb', line 67

def email
  @email
end

#envObject

The environment that the transaction is process within based on the transaction type.



70
71
72
# File 'lib/citypay_api_client/models/auth_reference.rb', line 70

def env
  @env
end

#identifierObject

The identifier of the transaction used to process the transaction.



73
74
75
# File 'lib/citypay_api_client/models/auth_reference.rb', line 73

def identifier
  @identifier
end

#initiationObject

The initiation of the payment. The value will be C for Card holder initiated and M for a merchant initiated transaction.



76
77
78
# File 'lib/citypay_api_client/models/auth_reference.rb', line 76

def initiation
  @initiation
end

#instrumentObject

The payment instrument used such as Card, Cash, Bank, Crypto, ApplePay, GooglePay, Click2Pay, PayPal, OpenBankingPayment.



79
80
81
# File 'lib/citypay_api_client/models/auth_reference.rb', line 79

def instrument
  @instrument
end

#maskedpanObject

A masking of the card number which was used to process the tranasction.



82
83
84
# File 'lib/citypay_api_client/models/auth_reference.rb', line 82

def maskedpan
  @maskedpan
end

#merchantidObject

The merchant id of the transaction result.



85
86
87
# File 'lib/citypay_api_client/models/auth_reference.rb', line 85

def merchantid
  @merchantid
end

#metaObject

Returns the value of attribute meta.



87
88
89
# File 'lib/citypay_api_client/models/auth_reference.rb', line 87

def meta
  @meta
end

#name_on_cardObject

The name of the card holder.



90
91
92
# File 'lib/citypay_api_client/models/auth_reference.rb', line 90

def name_on_card
  @name_on_card
end

#postcodeObject

The postcode of the card holder.



93
94
95
# File 'lib/citypay_api_client/models/auth_reference.rb', line 93

def postcode
  @postcode
end

#resultObject

The result of the transaction.



96
97
98
# File 'lib/citypay_api_client/models/auth_reference.rb', line 96

def result
  @result
end

#result_idObject

The id of the result of the transaction.



99
100
101
# File 'lib/citypay_api_client/models/auth_reference.rb', line 99

def result_id
  @result_id
end

#schemeObject

The card scheme of any card used.



102
103
104
# File 'lib/citypay_api_client/models/auth_reference.rb', line 102

def scheme
  @scheme
end

#scheme_logoObject

The card scheme logo of any card used.



105
106
107
# File 'lib/citypay_api_client/models/auth_reference.rb', line 105

def 
  
end

#trans_statusObject

The current status of the transaction through it’s lifecycle.



108
109
110
# File 'lib/citypay_api_client/models/auth_reference.rb', line 108

def trans_status
  @trans_status
end

#trans_typeObject

The type code of transaction that was processed.



111
112
113
# File 'lib/citypay_api_client/models/auth_reference.rb', line 111

def trans_type
  @trans_type
end

#transnoObject

The transaction number of the transaction.



114
115
116
# File 'lib/citypay_api_client/models/auth_reference.rb', line 114

def transno
  @transno
end

#typeObject

Defines whether the transaction is a sale, refund or verification.



117
118
119
# File 'lib/citypay_api_client/models/auth_reference.rb', line 117

def type
  @type
end

#utcObject

The date and time of the transaction in UTC milli seconds since the epoc.



120
121
122
# File 'lib/citypay_api_client/models/auth_reference.rb', line 120

def utc
  @utc
end

Class Method Details

._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



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
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/citypay_api_client/models/auth_reference.rb', line 643

def self._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 = CityPayApiClient.const_get(type)
    klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



164
165
166
# File 'lib/citypay_api_client/models/auth_reference.rb', line 164

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



169
170
171
# File 'lib/citypay_api_client/models/auth_reference.rb', line 169

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



123
124
125
126
127
128
129
130
131
132
133
134
135
136
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/citypay_api_client/models/auth_reference.rb', line 123

def self.attribute_map
  {
    :'address' => :'address',
    :'amount' => :'amount',
    :'amount_value' => :'amount_value',
    :'atrn' => :'atrn',
    :'authcode' => :'authcode',
    :'authen_result' => :'authen_result',
    :'batchno' => :'batchno',
    :'bin_commercial' => :'bin_commercial',
    :'bin_consumer' => :'bin_consumer',
    :'bin_corporate' => :'bin_corporate',
    :'bin_credit' => :'bin_credit',
    :'bin_debit' => :'bin_debit',
    :'cardholder_agreement' => :'cardholder_agreement',
    :'currency' => :'currency',
    :'datetime' => :'datetime',
    :'eci' => :'eci',
    :'email' => :'email',
    :'env' => :'env',
    :'identifier' => :'identifier',
    :'initiation' => :'initiation',
    :'instrument' => :'instrument',
    :'maskedpan' => :'maskedpan',
    :'merchantid' => :'merchantid',
    :'meta' => :'meta',
    :'name_on_card' => :'name_on_card',
    :'postcode' => :'postcode',
    :'result' => :'result',
    :'result_id' => :'result_id',
    :'scheme' => :'scheme',
    :'scheme_logo' => :'scheme_logo',
    :'trans_status' => :'trans_status',
    :'trans_type' => :'trans_type',
    :'transno' => :'transno',
    :'type' => :'type',
    :'utc' => :'utc'
  }
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



619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
# File 'lib/citypay_api_client/models/auth_reference.rb', line 619

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_nullableObject

List of attributes with nullable: true



215
216
217
218
# File 'lib/citypay_api_client/models/auth_reference.rb', line 215

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/citypay_api_client/models/auth_reference.rb', line 174

def self.openapi_types
  {
    :'address' => :'String',
    :'amount' => :'String',
    :'amount_value' => :'Integer',
    :'atrn' => :'String',
    :'authcode' => :'String',
    :'authen_result' => :'String',
    :'batchno' => :'String',
    :'bin_commercial' => :'Boolean',
    :'bin_consumer' => :'Boolean',
    :'bin_corporate' => :'Boolean',
    :'bin_credit' => :'Boolean',
    :'bin_debit' => :'Boolean',
    :'cardholder_agreement' => :'String',
    :'currency' => :'String',
    :'datetime' => :'Time',
    :'eci' => :'String',
    :'email' => :'String',
    :'env' => :'String',
    :'identifier' => :'String',
    :'initiation' => :'String',
    :'instrument' => :'String',
    :'maskedpan' => :'String',
    :'merchantid' => :'Integer',
    :'meta' => :'Hash<String, String>',
    :'name_on_card' => :'String',
    :'postcode' => :'String',
    :'result' => :'String',
    :'result_id' => :'String',
    :'scheme' => :'String',
    :'scheme_logo' => :'String',
    :'trans_status' => :'String',
    :'trans_type' => :'String',
    :'transno' => :'Integer',
    :'type' => :'String',
    :'utc' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
# File 'lib/citypay_api_client/models/auth_reference.rb', line 564

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      address == o.address &&
      amount == o.amount &&
      amount_value == o.amount_value &&
      atrn == o.atrn &&
      authcode == o.authcode &&
      authen_result == o.authen_result &&
      batchno == o.batchno &&
      bin_commercial == o.bin_commercial &&
      bin_consumer == o.bin_consumer &&
      bin_corporate == o.bin_corporate &&
      bin_credit == o.bin_credit &&
      bin_debit == o.bin_debit &&
      cardholder_agreement == o.cardholder_agreement &&
      currency == o.currency &&
      datetime == o.datetime &&
      eci == o.eci &&
      email == o.email &&
      env == o.env &&
      identifier == o.identifier &&
      initiation == o.initiation &&
      instrument == o.instrument &&
      maskedpan == o.maskedpan &&
      merchantid == o.merchantid &&
      meta == o.meta &&
      name_on_card == o.name_on_card &&
      postcode == o.postcode &&
      result == o.result &&
      result_id == o.result_id &&
      scheme == o.scheme &&
       == o. &&
      trans_status == o.trans_status &&
      trans_type == o.trans_type &&
      transno == o.transno &&
      type == o.type &&
      utc == o.utc
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



714
715
716
717
718
719
720
721
722
723
724
725
726
# File 'lib/citypay_api_client/models/auth_reference.rb', line 714

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

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


606
607
608
# File 'lib/citypay_api_client/models/auth_reference.rb', line 606

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



612
613
614
# File 'lib/citypay_api_client/models/auth_reference.rb', line 612

def hash
  [address, amount, amount_value, atrn, authcode, authen_result, batchno, bin_commercial, bin_consumer, bin_corporate, bin_credit, bin_debit, cardholder_agreement, currency, datetime, eci, email, env, identifier, initiation, instrument, maskedpan, merchantid, meta, name_on_card, postcode, result, result_id, scheme, , trans_status, trans_type, transno, type, utc].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
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
432
433
# File 'lib/citypay_api_client/models/auth_reference.rb', line 381

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if !@amount.nil? && @amount.to_s.length > 10
    invalid_properties.push('invalid value for "amount", the character length must be smaller than or equal to 10.')
  end

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

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

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

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

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

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

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

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

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

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

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



690
691
692
# File 'lib/citypay_api_client/models/auth_reference.rb', line 690

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



696
697
698
699
700
701
702
703
704
705
706
707
708
# File 'lib/citypay_api_client/models/auth_reference.rb', line 696

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



684
685
686
# File 'lib/citypay_api_client/models/auth_reference.rb', line 684

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



437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/citypay_api_client/models/auth_reference.rb', line 437

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if !@amount.nil? && @amount.to_s.length > 10
  return false if !@cardholder_agreement.nil? && @cardholder_agreement.to_s.length > 1
  return false if !@currency.nil? && @currency.to_s.length > 3
  return false if !@currency.nil? && @currency.to_s.length < 3
  return false if !@email.nil? && @email.to_s.length > 254
  return false if !@identifier.nil? && @identifier.to_s.length > 50
  return false if !@identifier.nil? && @identifier.to_s.length < 4
  return false if !@initiation.nil? && @initiation.to_s.length > 1
  return false if !@name_on_card.nil? && @name_on_card.to_s.length > 45
  return false if !@name_on_card.nil? && @name_on_card.to_s.length < 2
  return false if !@postcode.nil? && @postcode.to_s.length > 16
  return false if !@trans_type.nil? && @trans_type.to_s.length > 1
  true
end