Class: CyberSource::VTConfigCardNotPresentGlobalPaymentInformationMerchantDefinedDataFields

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ VTConfigCardNotPresentGlobalPaymentInformationMerchantDefinedDataFields

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 161

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'displayMerchantDefinedData1')
    self.display_merchant_defined_data1 = attributes[:'displayMerchantDefinedData1']
  end

  if attributes.has_key?(:'displayMerchantDefinedData2')
    self.display_merchant_defined_data2 = attributes[:'displayMerchantDefinedData2']
  end

  if attributes.has_key?(:'displayMerchantDefinedData3')
    self.display_merchant_defined_data3 = attributes[:'displayMerchantDefinedData3']
  end

  if attributes.has_key?(:'displayMerchantDefinedData4')
    self.display_merchant_defined_data4 = attributes[:'displayMerchantDefinedData4']
  end

  if attributes.has_key?(:'displayMerchantDefinedData5')
    self.display_merchant_defined_data5 = attributes[:'displayMerchantDefinedData5']
  end

  if attributes.has_key?(:'merchantDefinedData1DefaultValue')
    self.merchant_defined_data1_default_value = attributes[:'merchantDefinedData1DefaultValue']
  end

  if attributes.has_key?(:'merchantDefinedData1Label')
    self.merchant_defined_data1_label = attributes[:'merchantDefinedData1Label']
  end

  if attributes.has_key?(:'requireMerchantDefinedData1')
    self.require_merchant_defined_data1 = attributes[:'requireMerchantDefinedData1']
  end

  if attributes.has_key?(:'merchantDefinedData2DefaultValue')
    self.merchant_defined_data2_default_value = attributes[:'merchantDefinedData2DefaultValue']
  end

  if attributes.has_key?(:'merchantDefinedData2Label')
    self.merchant_defined_data2_label = attributes[:'merchantDefinedData2Label']
  end

  if attributes.has_key?(:'requireMerchantDefinedData2')
    self.require_merchant_defined_data2 = attributes[:'requireMerchantDefinedData2']
  end

  if attributes.has_key?(:'merchantDefinedData3DefaultValue')
    self.merchant_defined_data3_default_value = attributes[:'merchantDefinedData3DefaultValue']
  end

  if attributes.has_key?(:'merchantDefinedData3Label')
    self.merchant_defined_data3_label = attributes[:'merchantDefinedData3Label']
  end

  if attributes.has_key?(:'requireMerchantDefinedData3')
    self.require_merchant_defined_data3 = attributes[:'requireMerchantDefinedData3']
  end

  if attributes.has_key?(:'merchantDefinedData4DefaultValue')
    self.merchant_defined_data4_default_value = attributes[:'merchantDefinedData4DefaultValue']
  end

  if attributes.has_key?(:'merchantDefinedData4Label')
    self.merchant_defined_data4_label = attributes[:'merchantDefinedData4Label']
  end

  if attributes.has_key?(:'requireMerchantDefinedData4')
    self.require_merchant_defined_data4 = attributes[:'requireMerchantDefinedData4']
  end

  if attributes.has_key?(:'merchantDefinedData5DefaultValue')
    self.merchant_defined_data5_default_value = attributes[:'merchantDefinedData5DefaultValue']
  end

  if attributes.has_key?(:'merchantDefinedData5Label')
    self.merchant_defined_data5_label = attributes[:'merchantDefinedData5Label']
  end

  if attributes.has_key?(:'requireMerchantDefinedData5')
    self.require_merchant_defined_data5 = attributes[:'requireMerchantDefinedData5']
  end

  if attributes.has_key?(:'merchantDefinedData1DisplayOnReceipt')
    self.merchant_defined_data1_display_on_receipt = attributes[:'merchantDefinedData1DisplayOnReceipt']
  end

  if attributes.has_key?(:'merchantDefinedData2DisplayOnReceipt')
    self.merchant_defined_data2_display_on_receipt = attributes[:'merchantDefinedData2DisplayOnReceipt']
  end

  if attributes.has_key?(:'merchantDefinedData3DisplayOnReceipt')
    self.merchant_defined_data3_display_on_receipt = attributes[:'merchantDefinedData3DisplayOnReceipt']
  end

  if attributes.has_key?(:'merchantDefinedData4DisplayOnReceipt')
    self.merchant_defined_data4_display_on_receipt = attributes[:'merchantDefinedData4DisplayOnReceipt']
  end

  if attributes.has_key?(:'merchantDefinedData5DisplayOnReceipt')
    self.merchant_defined_data5_display_on_receipt = attributes[:'merchantDefinedData5DisplayOnReceipt']
  end
end

Instance Attribute Details

#display_merchant_defined_data1Object

Returns the value of attribute display_merchant_defined_data1.



16
17
18
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 16

def display_merchant_defined_data1
  @display_merchant_defined_data1
end

#display_merchant_defined_data2Object

Returns the value of attribute display_merchant_defined_data2.



18
19
20
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 18

def display_merchant_defined_data2
  @display_merchant_defined_data2
end

#display_merchant_defined_data3Object

Returns the value of attribute display_merchant_defined_data3.



20
21
22
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 20

def display_merchant_defined_data3
  @display_merchant_defined_data3
end

#display_merchant_defined_data4Object

Returns the value of attribute display_merchant_defined_data4.



22
23
24
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 22

def display_merchant_defined_data4
  @display_merchant_defined_data4
end

#display_merchant_defined_data5Object

Returns the value of attribute display_merchant_defined_data5.



24
25
26
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 24

def display_merchant_defined_data5
  @display_merchant_defined_data5
end

#merchant_defined_data1_default_valueObject

Returns the value of attribute merchant_defined_data1_default_value.



26
27
28
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 26

def merchant_defined_data1_default_value
  @merchant_defined_data1_default_value
end

#merchant_defined_data1_display_on_receiptObject

Returns the value of attribute merchant_defined_data1_display_on_receipt.



56
57
58
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 56

def merchant_defined_data1_display_on_receipt
  @merchant_defined_data1_display_on_receipt
end

#merchant_defined_data1_labelObject

Returns the value of attribute merchant_defined_data1_label.



28
29
30
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 28

def merchant_defined_data1_label
  @merchant_defined_data1_label
end

#merchant_defined_data2_default_valueObject

Returns the value of attribute merchant_defined_data2_default_value.



32
33
34
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 32

def merchant_defined_data2_default_value
  @merchant_defined_data2_default_value
end

#merchant_defined_data2_display_on_receiptObject

Returns the value of attribute merchant_defined_data2_display_on_receipt.



58
59
60
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 58

def merchant_defined_data2_display_on_receipt
  @merchant_defined_data2_display_on_receipt
end

#merchant_defined_data2_labelObject

Returns the value of attribute merchant_defined_data2_label.



34
35
36
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 34

def merchant_defined_data2_label
  @merchant_defined_data2_label
end

#merchant_defined_data3_default_valueObject

Returns the value of attribute merchant_defined_data3_default_value.



38
39
40
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 38

def merchant_defined_data3_default_value
  @merchant_defined_data3_default_value
end

#merchant_defined_data3_display_on_receiptObject

Returns the value of attribute merchant_defined_data3_display_on_receipt.



60
61
62
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 60

def merchant_defined_data3_display_on_receipt
  @merchant_defined_data3_display_on_receipt
end

#merchant_defined_data3_labelObject

Returns the value of attribute merchant_defined_data3_label.



40
41
42
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 40

def merchant_defined_data3_label
  @merchant_defined_data3_label
end

#merchant_defined_data4_default_valueObject

Returns the value of attribute merchant_defined_data4_default_value.



44
45
46
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 44

def merchant_defined_data4_default_value
  @merchant_defined_data4_default_value
end

#merchant_defined_data4_display_on_receiptObject

Returns the value of attribute merchant_defined_data4_display_on_receipt.



62
63
64
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 62

def merchant_defined_data4_display_on_receipt
  @merchant_defined_data4_display_on_receipt
end

#merchant_defined_data4_labelObject

Returns the value of attribute merchant_defined_data4_label.



46
47
48
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 46

def merchant_defined_data4_label
  @merchant_defined_data4_label
end

#merchant_defined_data5_default_valueObject

Returns the value of attribute merchant_defined_data5_default_value.



50
51
52
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 50

def merchant_defined_data5_default_value
  @merchant_defined_data5_default_value
end

#merchant_defined_data5_display_on_receiptObject

Returns the value of attribute merchant_defined_data5_display_on_receipt.



64
65
66
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 64

def merchant_defined_data5_display_on_receipt
  @merchant_defined_data5_display_on_receipt
end

#merchant_defined_data5_labelObject

Returns the value of attribute merchant_defined_data5_label.



52
53
54
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 52

def merchant_defined_data5_label
  @merchant_defined_data5_label
end

#require_merchant_defined_data1Object

Returns the value of attribute require_merchant_defined_data1.



30
31
32
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 30

def require_merchant_defined_data1
  @require_merchant_defined_data1
end

#require_merchant_defined_data2Object

Returns the value of attribute require_merchant_defined_data2.



36
37
38
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 36

def require_merchant_defined_data2
  @require_merchant_defined_data2
end

#require_merchant_defined_data3Object

Returns the value of attribute require_merchant_defined_data3.



42
43
44
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 42

def require_merchant_defined_data3
  @require_merchant_defined_data3
end

#require_merchant_defined_data4Object

Returns the value of attribute require_merchant_defined_data4.



48
49
50
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 48

def require_merchant_defined_data4
  @require_merchant_defined_data4
end

#require_merchant_defined_data5Object

Returns the value of attribute require_merchant_defined_data5.



54
55
56
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 54

def require_merchant_defined_data5
  @require_merchant_defined_data5
end

Class Method Details

.attribute_mapObject

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



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 67

def self.attribute_map
  {
    :'display_merchant_defined_data1' => :'displayMerchantDefinedData1',
    :'display_merchant_defined_data2' => :'displayMerchantDefinedData2',
    :'display_merchant_defined_data3' => :'displayMerchantDefinedData3',
    :'display_merchant_defined_data4' => :'displayMerchantDefinedData4',
    :'display_merchant_defined_data5' => :'displayMerchantDefinedData5',
    :'merchant_defined_data1_default_value' => :'merchantDefinedData1DefaultValue',
    :'merchant_defined_data1_label' => :'merchantDefinedData1Label',
    :'require_merchant_defined_data1' => :'requireMerchantDefinedData1',
    :'merchant_defined_data2_default_value' => :'merchantDefinedData2DefaultValue',
    :'merchant_defined_data2_label' => :'merchantDefinedData2Label',
    :'require_merchant_defined_data2' => :'requireMerchantDefinedData2',
    :'merchant_defined_data3_default_value' => :'merchantDefinedData3DefaultValue',
    :'merchant_defined_data3_label' => :'merchantDefinedData3Label',
    :'require_merchant_defined_data3' => :'requireMerchantDefinedData3',
    :'merchant_defined_data4_default_value' => :'merchantDefinedData4DefaultValue',
    :'merchant_defined_data4_label' => :'merchantDefinedData4Label',
    :'require_merchant_defined_data4' => :'requireMerchantDefinedData4',
    :'merchant_defined_data5_default_value' => :'merchantDefinedData5DefaultValue',
    :'merchant_defined_data5_label' => :'merchantDefinedData5Label',
    :'require_merchant_defined_data5' => :'requireMerchantDefinedData5',
    :'merchant_defined_data1_display_on_receipt' => :'merchantDefinedData1DisplayOnReceipt',
    :'merchant_defined_data2_display_on_receipt' => :'merchantDefinedData2DisplayOnReceipt',
    :'merchant_defined_data3_display_on_receipt' => :'merchantDefinedData3DisplayOnReceipt',
    :'merchant_defined_data4_display_on_receipt' => :'merchantDefinedData4DisplayOnReceipt',
    :'merchant_defined_data5_display_on_receipt' => :'merchantDefinedData5DisplayOnReceipt'
  }
end

.json_mapObject

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



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 98

def self.json_map
  {
    :'display_merchant_defined_data1' => :'display_merchant_defined_data1',
    :'display_merchant_defined_data2' => :'display_merchant_defined_data2',
    :'display_merchant_defined_data3' => :'display_merchant_defined_data3',
    :'display_merchant_defined_data4' => :'display_merchant_defined_data4',
    :'display_merchant_defined_data5' => :'display_merchant_defined_data5',
    :'merchant_defined_data1_default_value' => :'merchant_defined_data1_default_value',
    :'merchant_defined_data1_label' => :'merchant_defined_data1_label',
    :'require_merchant_defined_data1' => :'require_merchant_defined_data1',
    :'merchant_defined_data2_default_value' => :'merchant_defined_data2_default_value',
    :'merchant_defined_data2_label' => :'merchant_defined_data2_label',
    :'require_merchant_defined_data2' => :'require_merchant_defined_data2',
    :'merchant_defined_data3_default_value' => :'merchant_defined_data3_default_value',
    :'merchant_defined_data3_label' => :'merchant_defined_data3_label',
    :'require_merchant_defined_data3' => :'require_merchant_defined_data3',
    :'merchant_defined_data4_default_value' => :'merchant_defined_data4_default_value',
    :'merchant_defined_data4_label' => :'merchant_defined_data4_label',
    :'require_merchant_defined_data4' => :'require_merchant_defined_data4',
    :'merchant_defined_data5_default_value' => :'merchant_defined_data5_default_value',
    :'merchant_defined_data5_label' => :'merchant_defined_data5_label',
    :'require_merchant_defined_data5' => :'require_merchant_defined_data5',
    :'merchant_defined_data1_display_on_receipt' => :'merchant_defined_data1_display_on_receipt',
    :'merchant_defined_data2_display_on_receipt' => :'merchant_defined_data2_display_on_receipt',
    :'merchant_defined_data3_display_on_receipt' => :'merchant_defined_data3_display_on_receipt',
    :'merchant_defined_data4_display_on_receipt' => :'merchant_defined_data4_display_on_receipt',
    :'merchant_defined_data5_display_on_receipt' => :'merchant_defined_data5_display_on_receipt'
  }
end

.swagger_typesObject

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
151
152
153
154
155
156
157
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 129

def self.swagger_types
  {
    :'display_merchant_defined_data1' => :'BOOLEAN',
    :'display_merchant_defined_data2' => :'BOOLEAN',
    :'display_merchant_defined_data3' => :'BOOLEAN',
    :'display_merchant_defined_data4' => :'BOOLEAN',
    :'display_merchant_defined_data5' => :'BOOLEAN',
    :'merchant_defined_data1_default_value' => :'String',
    :'merchant_defined_data1_label' => :'String',
    :'require_merchant_defined_data1' => :'BOOLEAN',
    :'merchant_defined_data2_default_value' => :'String',
    :'merchant_defined_data2_label' => :'String',
    :'require_merchant_defined_data2' => :'BOOLEAN',
    :'merchant_defined_data3_default_value' => :'String',
    :'merchant_defined_data3_label' => :'String',
    :'require_merchant_defined_data3' => :'BOOLEAN',
    :'merchant_defined_data4_default_value' => :'String',
    :'merchant_defined_data4_label' => :'String',
    :'require_merchant_defined_data4' => :'BOOLEAN',
    :'merchant_defined_data5_default_value' => :'String',
    :'merchant_defined_data5_label' => :'String',
    :'require_merchant_defined_data5' => :'BOOLEAN',
    :'merchant_defined_data1_display_on_receipt' => :'BOOLEAN',
    :'merchant_defined_data2_display_on_receipt' => :'BOOLEAN',
    :'merchant_defined_data3_display_on_receipt' => :'BOOLEAN',
    :'merchant_defined_data4_display_on_receipt' => :'BOOLEAN',
    :'merchant_defined_data5_display_on_receipt' => :'BOOLEAN'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 283

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      display_merchant_defined_data1 == o.display_merchant_defined_data1 &&
      display_merchant_defined_data2 == o.display_merchant_defined_data2 &&
      display_merchant_defined_data3 == o.display_merchant_defined_data3 &&
      display_merchant_defined_data4 == o.display_merchant_defined_data4 &&
      display_merchant_defined_data5 == o.display_merchant_defined_data5 &&
      merchant_defined_data1_default_value == o.merchant_defined_data1_default_value &&
      merchant_defined_data1_label == o.merchant_defined_data1_label &&
      require_merchant_defined_data1 == o.require_merchant_defined_data1 &&
      merchant_defined_data2_default_value == o.merchant_defined_data2_default_value &&
      merchant_defined_data2_label == o.merchant_defined_data2_label &&
      require_merchant_defined_data2 == o.require_merchant_defined_data2 &&
      merchant_defined_data3_default_value == o.merchant_defined_data3_default_value &&
      merchant_defined_data3_label == o.merchant_defined_data3_label &&
      require_merchant_defined_data3 == o.require_merchant_defined_data3 &&
      merchant_defined_data4_default_value == o.merchant_defined_data4_default_value &&
      merchant_defined_data4_label == o.merchant_defined_data4_label &&
      require_merchant_defined_data4 == o.require_merchant_defined_data4 &&
      merchant_defined_data5_default_value == o.merchant_defined_data5_default_value &&
      merchant_defined_data5_label == o.merchant_defined_data5_label &&
      require_merchant_defined_data5 == o.require_merchant_defined_data5 &&
      merchant_defined_data1_display_on_receipt == o.merchant_defined_data1_display_on_receipt &&
      merchant_defined_data2_display_on_receipt == o.merchant_defined_data2_display_on_receipt &&
      merchant_defined_data3_display_on_receipt == o.merchant_defined_data3_display_on_receipt &&
      merchant_defined_data4_display_on_receipt == o.merchant_defined_data4_display_on_receipt &&
      merchant_defined_data5_display_on_receipt == o.merchant_defined_data5_display_on_receipt
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



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
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 349

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.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
    temp_model = CyberSource.const_get(type).new
    temp_model.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



415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 415

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



328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 328

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


315
316
317
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 315

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



321
322
323
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 321

def hash
  [display_merchant_defined_data1, display_merchant_defined_data2, display_merchant_defined_data3, display_merchant_defined_data4, display_merchant_defined_data5, merchant_defined_data1_default_value, merchant_defined_data1_label, require_merchant_defined_data1, merchant_defined_data2_default_value, merchant_defined_data2_label, require_merchant_defined_data2, merchant_defined_data3_default_value, merchant_defined_data3_label, require_merchant_defined_data3, merchant_defined_data4_default_value, merchant_defined_data4_label, require_merchant_defined_data4, merchant_defined_data5_default_value, merchant_defined_data5_label, require_merchant_defined_data5, merchant_defined_data1_display_on_receipt, merchant_defined_data2_display_on_receipt, merchant_defined_data3_display_on_receipt, merchant_defined_data4_display_on_receipt, merchant_defined_data5_display_on_receipt].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



270
271
272
273
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 270

def list_invalid_properties
  invalid_properties = Array.new
  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



395
396
397
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 395

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



401
402
403
404
405
406
407
408
409
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 401

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



389
390
391
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 389

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



277
278
279
# File 'lib/cybersource_rest_client/models/vt_config_card_not_present_global_payment_information_merchant_defined_data_fields.rb', line 277

def valid?
  true
end