Class: CyberSource::PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon

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

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
267
268
269
270
271
272
273
274
275
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 184

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?(:'processors')
    if (value = attributes[:'processors']).is_a?(Hash)
      self.processors = value
    end
  end

  if attributes.has_key?(:'amexVendorCode')
    self.amex_vendor_code = attributes[:'amexVendorCode']
  end

  if attributes.has_key?(:'defaultAuthTypeCode')
    self.default_auth_type_code = attributes[:'defaultAuthTypeCode']
  end

  if attributes.has_key?(:'masterCardAssignedId')
    self.master_card_assigned_id = attributes[:'masterCardAssignedId']
  end

  if attributes.has_key?(:'enablePartialAuth')
    self.enable_partial_auth = attributes[:'enablePartialAuth']
  end

  if attributes.has_key?(:'merchantCategoryCode')
    self.merchant_category_code = attributes[:'merchantCategoryCode']
  end

  if attributes.has_key?(:'sicCode')
    self.sic_code = attributes[:'sicCode']
  end

  if attributes.has_key?(:'foodAndConsumerServiceId')
    self.food_and_consumer_service_id = attributes[:'foodAndConsumerServiceId']
  end

  if attributes.has_key?(:'enableSplitShipment')
    self.enable_split_shipment = attributes[:'enableSplitShipment']
  end

  if attributes.has_key?(:'enableInterchangeOptimization')
    self.enable_interchange_optimization = attributes[:'enableInterchangeOptimization']
  end

  if attributes.has_key?(:'visaDelegatedAuthenticationId')
    self.visa_delegated_authentication_id = attributes[:'visaDelegatedAuthenticationId']
  end

  if attributes.has_key?(:'creditCardRefundLimitPercent')
    self.credit_card_refund_limit_percent = attributes[:'creditCardRefundLimitPercent']
  end

  if attributes.has_key?(:'businessCenterCreditCardRefundLimitPercent')
    self.business_center_credit_card_refund_limit_percent = attributes[:'businessCenterCreditCardRefundLimitPercent']
  end

  if attributes.has_key?(:'allowCapturesGreaterThanAuthorizations')
    self.allow_captures_greater_than_authorizations = attributes[:'allowCapturesGreaterThanAuthorizations']
  end

  if attributes.has_key?(:'enableDuplicateMerchantReferenceNumberBlocking')
    self.enable_duplicate_merchant_reference_number_blocking = attributes[:'enableDuplicateMerchantReferenceNumberBlocking']
  end

  if attributes.has_key?(:'domesticMerchantId')
    self.domestic_merchant_id = attributes[:'domesticMerchantId']
  end

  if attributes.has_key?(:'processLevel3Data')
    self.process_level3_data = attributes[:'processLevel3Data']
  end

  if attributes.has_key?(:'subMerchantId')
    self.sub_merchant_id = attributes[:'subMerchantId']
  end

  if attributes.has_key?(:'subMerchantBusinessName')
    self.sub_merchant_business_name = attributes[:'subMerchantBusinessName']
  end

  if attributes.has_key?(:'preferCobadgedSecondaryBrand')
    self.prefer_cobadged_secondary_brand = attributes[:'preferCobadgedSecondaryBrand']
  end

  if attributes.has_key?(:'merchantDescriptorInformation')
    self.merchant_descriptor_information = attributes[:'merchantDescriptorInformation']
  end
end

Instance Attribute Details

#allow_captures_greater_than_authorizationsObject

Enables this merchant account to capture amounts greater than the authorization amount. Applicable for GPX (gpx), VPC, Paymentech Tampa (paymentechtampa) and Chase Paymentech Salem (chasepaymentechsalem) processors.



57
58
59
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 57

def allow_captures_greater_than_authorizations
  @allow_captures_greater_than_authorizations
end

#amex_vendor_codeObject

Vendor code assigned by American Express. Applicable for TSYS (tsys) processor.



21
22
23
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 21

def amex_vendor_code
  @amex_vendor_code
end

#business_center_credit_card_refund_limit_percentObject

Limits refunds to the percentage set in this field. Applicable for GPX (gpx) and VPC processors.



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

def business_center_credit_card_refund_limit_percent
  @business_center_credit_card_refund_limit_percent
end

#credit_card_refund_limit_percentObject

Blocks over-refunds when the aggregated refund amount is higher than the percentage set for this field. Applicable for GPX (gpx), VPC and Chase Paymentech Salem (chasepaymentechsalem) processors.



51
52
53
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 51

def credit_card_refund_limit_percent
  @credit_card_refund_limit_percent
end

#default_auth_type_codeObject

Authorization Finality indicator. Please note that the input can be in small case or capitals but response is in small case as of now. It will be made capitals everywhere in the next version. Applicable for Elavon Americas (elavonamericas), TSYS (tsys), Barclays (barclays2), Streamline (streamline2), Six (six), Barclays HISO (barclayshiso), GPN (gpn), FDI Global (fdiglobal), GPX (gpx), Paymentech Tampa (paymentechtampa), FDC Nashville (smartfdc), VPC and Chase Paymentech Salem (chasepaymentechsalem) processors. Validation details (for selected processors)… <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Default Value</th></tr></thead> <tr><td>Barclays</td><td>cnp, cp, hybrid</td><td>No</td><td>FINAL</td></tr> <tr><td>Barclays HISO</td><td>cnp, cp, hybrid</td><td>Yes</td><td>FINAL</td></tr> </table>



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

def default_auth_type_code
  @default_auth_type_code
end

#domestic_merchant_idObject

This is a local merchant ID used by merchants in addition to the conventional merchant ID. This value is sent to the issuer. Applicable for VPC and Prisma (prisma) processors.



63
64
65
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 63

def domestic_merchant_id
  @domestic_merchant_id
end

#enable_duplicate_merchant_reference_number_blockingObject

Helps prevent duplicate transactions. Applicable for VPC, GPX (gpx) and Chase Paymentech Salem (chasepaymentechsalem) processors.



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

def enable_duplicate_merchant_reference_number_blocking
  @enable_duplicate_merchant_reference_number_blocking
end

#enable_interchange_optimizationObject

Reduces your interchange fees by using automatic authorization refresh and automatic partial authorization reversal. Applicable for VPC processors.



45
46
47
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 45

def enable_interchange_optimization
  @enable_interchange_optimization
end

#enable_partial_authObject

Allow merchants to accept partial authorization approvals. Applicable for Elavon Americas (elavonamericas), VPC, GPX (gpx), FDI Global (fdiglobal), FDC Nashville (smartfdc), GPN (gpn), TSYS (tsys), American Express Direct (amexdirect), Paymentech Tampa (paymentechtampa) and Chase Paymentech Salem (chasepaymentechsalem) processors. Validation details (for selected processors)… <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Default Value</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>No</td><td>No</td></tr> </table>



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

def enable_partial_auth
  @enable_partial_auth
end

#enable_split_shipmentObject

Enables you to split an order into multiple shipments with multiple captures. This feature is provided by CyberSource and supports three different scenarios: * multiple authorizations * multiple captures * multiple authorizations with multiple captures Applicable for VPC processors.



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

def enable_split_shipment
  @enable_split_shipment
end

#food_and_consumer_service_idObject

Food and Consumer Service ID. Identifies the merchant as being certified and approved to accept Food Stamps. Applicable for GPX (gpx) processor.



39
40
41
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 39

def food_and_consumer_service_id
  @food_and_consumer_service_id
end

#master_card_assigned_idObject

MAID aka MasterCard assigned ID, MasterCard equivalent of Merchant Verification Value by Visa. Applicable for VPC, GPX (gpx) and FDI Global (fdiglobal) processors.



27
28
29
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 27

def master_card_assigned_id
  @master_card_assigned_id
end

#merchant_category_codeObject

Indicates type of business product or service of the merchant. Applicable for Chase Paymentech Salem (chasepaymentechsalem), FDI Global (fdiglobal), RUPAY, Elavon Americas (elavonamericas), American Express Direct (amexdirect), CMCIC (cmcic), GPX (gpx), VPC, TSYS (tsys), EFTPOS, CUP, Paymentech Tampa (paymentechtampa), CB2A, Barclays (barclays2), Prisma (prisma) and GPN (gpn) processors. Validation details (for selected processors)… <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>Barclays</td><td>cnp</td><td>No</td><td>4</td><td>4</td><td>^$</td></tr> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>Yes</td><td>4</td><td>4</td><td>^$</td></tr> </table>



33
34
35
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 33

def merchant_category_code
  @merchant_category_code
end

#merchant_descriptor_informationObject

Returns the value of attribute merchant_descriptor_information.



77
78
79
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 77

def merchant_descriptor_information
  @merchant_descriptor_information
end

#prefer_cobadged_secondary_brandObject

It denotes merchant’s preference on secondary brand for routing in case of co-branded cards. Applicable for EFTPOS processors.



75
76
77
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 75

def prefer_cobadged_secondary_brand
  @prefer_cobadged_secondary_brand
end

#process_level3_dataObject

Indicates whether merchant processes Level 3 transactions. Applicable for TSYS (tsys), Barclays (barclays2), Paymentech Tampa (paymentechtampa), FDI Global (fdiglobal), Elavon Americas (elavonamericas) and Chase Paymentech Salem (chasepaymentechsalem) processors. Validation details (for selected processors)… <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th></tr></thead> <tr><td>Barclays</td><td>cnp</td><td>No</td></tr> </table>



66
67
68
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 66

def process_level3_data
  @process_level3_data
end

#processorsObject

e.g. * amexdirect * barclays2 * CUP * EFTPOS * fdiglobal * gpx * smartfdc * tsys * vero * VPC For VPC, CUP and EFTPOS processors, replace the processor name from VPC or CUP or EFTPOS to the actual processor name in the sample request. e.g. replace VPC with &lt;your vpc processor&gt;



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

def processors
  @processors
end

#sic_codeObject

The Standard Industrial Classification (SIC) are four-digit codes that categorize the industries that companies belong to based on their business activities. Standard Industrial Classification codes were mostly replaced by the six-digit North American Industry Classification System (NAICS). Applicable for VPC and GPX (gpx) processors.



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

def sic_code
  @sic_code
end

#sub_merchant_business_nameObject

Sub-merchant’s business name. Applicable for American Express Direct (amexdirect) processor. Validation details (for selected processors)… <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>No</td><td>1</td><td>37</td><td>^+$</td></tr> </table>



72
73
74
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 72

def sub_merchant_business_name
  @sub_merchant_business_name
end

#sub_merchant_idObject

The ID assigned to the sub-merchant. Applicable for American Express Direct (amexdirect) processor. Validation details (for selected processors)… <table> <thead><tr><th>Processor</th><th>Acceptance Type</th><th>Required</th><th>Min. Length</th><th>Max. Length</th><th>Regex</th></tr></thead> <tr><td>American Express Direct</td><td>cnp, cp, hybrid</td><td>No</td><td>1</td><td>20</td><td>^+$</td></tr> </table>



69
70
71
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 69

def sub_merchant_id
  @sub_merchant_id
end

#visa_delegated_authentication_idObject

Identifier provided to merchants who opt for Visa’s delegated authorization program. Applicable for VPC processors.



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

def visa_delegated_authentication_id
  @visa_delegated_authentication_id
end

Class Method Details

.attribute_mapObject

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



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/payments_products_card_processing_configuration_information_configurations_common.rb', line 102

def self.attribute_map
  {
    :'processors' => :'processors',
    :'amex_vendor_code' => :'amexVendorCode',
    :'default_auth_type_code' => :'defaultAuthTypeCode',
    :'master_card_assigned_id' => :'masterCardAssignedId',
    :'enable_partial_auth' => :'enablePartialAuth',
    :'merchant_category_code' => :'merchantCategoryCode',
    :'sic_code' => :'sicCode',
    :'food_and_consumer_service_id' => :'foodAndConsumerServiceId',
    :'enable_split_shipment' => :'enableSplitShipment',
    :'enable_interchange_optimization' => :'enableInterchangeOptimization',
    :'visa_delegated_authentication_id' => :'visaDelegatedAuthenticationId',
    :'credit_card_refund_limit_percent' => :'creditCardRefundLimitPercent',
    :'business_center_credit_card_refund_limit_percent' => :'businessCenterCreditCardRefundLimitPercent',
    :'allow_captures_greater_than_authorizations' => :'allowCapturesGreaterThanAuthorizations',
    :'enable_duplicate_merchant_reference_number_blocking' => :'enableDuplicateMerchantReferenceNumberBlocking',
    :'domestic_merchant_id' => :'domesticMerchantId',
    :'process_level3_data' => :'processLevel3Data',
    :'sub_merchant_id' => :'subMerchantId',
    :'sub_merchant_business_name' => :'subMerchantBusinessName',
    :'prefer_cobadged_secondary_brand' => :'preferCobadgedSecondaryBrand',
    :'merchant_descriptor_information' => :'merchantDescriptorInformation'
  }
end

.json_mapObject

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



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

def self.json_map
  {
    :'processors' => :'processors',
    :'amex_vendor_code' => :'amex_vendor_code',
    :'default_auth_type_code' => :'default_auth_type_code',
    :'master_card_assigned_id' => :'master_card_assigned_id',
    :'enable_partial_auth' => :'enable_partial_auth',
    :'merchant_category_code' => :'merchant_category_code',
    :'sic_code' => :'sic_code',
    :'food_and_consumer_service_id' => :'food_and_consumer_service_id',
    :'enable_split_shipment' => :'enable_split_shipment',
    :'enable_interchange_optimization' => :'enable_interchange_optimization',
    :'visa_delegated_authentication_id' => :'visa_delegated_authentication_id',
    :'credit_card_refund_limit_percent' => :'credit_card_refund_limit_percent',
    :'business_center_credit_card_refund_limit_percent' => :'business_center_credit_card_refund_limit_percent',
    :'allow_captures_greater_than_authorizations' => :'allow_captures_greater_than_authorizations',
    :'enable_duplicate_merchant_reference_number_blocking' => :'enable_duplicate_merchant_reference_number_blocking',
    :'domestic_merchant_id' => :'domestic_merchant_id',
    :'process_level3_data' => :'process_level3_data',
    :'sub_merchant_id' => :'sub_merchant_id',
    :'sub_merchant_business_name' => :'sub_merchant_business_name',
    :'prefer_cobadged_secondary_brand' => :'prefer_cobadged_secondary_brand',
    :'merchant_descriptor_information' => :'merchant_descriptor_information'
  }
end

.swagger_typesObject

Attribute type mapping.



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 156

def self.swagger_types
  {
    :'processors' => :'Hash<String, PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommonProcessors>',
    :'amex_vendor_code' => :'String',
    :'default_auth_type_code' => :'String',
    :'master_card_assigned_id' => :'String',
    :'enable_partial_auth' => :'BOOLEAN',
    :'merchant_category_code' => :'String',
    :'sic_code' => :'String',
    :'food_and_consumer_service_id' => :'String',
    :'enable_split_shipment' => :'BOOLEAN',
    :'enable_interchange_optimization' => :'BOOLEAN',
    :'visa_delegated_authentication_id' => :'String',
    :'credit_card_refund_limit_percent' => :'String',
    :'business_center_credit_card_refund_limit_percent' => :'String',
    :'allow_captures_greater_than_authorizations' => :'BOOLEAN',
    :'enable_duplicate_merchant_reference_number_blocking' => :'BOOLEAN',
    :'domestic_merchant_id' => :'BOOLEAN',
    :'process_level3_data' => :'String',
    :'sub_merchant_id' => :'String',
    :'sub_merchant_business_name' => :'String',
    :'prefer_cobadged_secondary_brand' => :'BOOLEAN',
    :'merchant_descriptor_information' => :'PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommonMerchantDescriptorInformation'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      processors == o.processors &&
      amex_vendor_code == o.amex_vendor_code &&
      default_auth_type_code == o.default_auth_type_code &&
      master_card_assigned_id == o.master_card_assigned_id &&
      enable_partial_auth == o.enable_partial_auth &&
      merchant_category_code == o.merchant_category_code &&
      sic_code == o.sic_code &&
      food_and_consumer_service_id == o.food_and_consumer_service_id &&
      enable_split_shipment == o.enable_split_shipment &&
      enable_interchange_optimization == o.enable_interchange_optimization &&
      visa_delegated_authentication_id == o.visa_delegated_authentication_id &&
      credit_card_refund_limit_percent == o.credit_card_refund_limit_percent &&
      business_center_credit_card_refund_limit_percent == o.business_center_credit_card_refund_limit_percent &&
      allow_captures_greater_than_authorizations == o.allow_captures_greater_than_authorizations &&
      enable_duplicate_merchant_reference_number_blocking == o.enable_duplicate_merchant_reference_number_blocking &&
      domestic_merchant_id == o.domestic_merchant_id &&
      process_level3_data == o.process_level3_data &&
      sub_merchant_id == o.sub_merchant_id &&
      sub_merchant_business_name == o.sub_merchant_business_name &&
      prefer_cobadged_secondary_brand == o.prefer_cobadged_secondary_brand &&
      merchant_descriptor_information == o.merchant_descriptor_information
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



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
398
399
400
401
402
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 366

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



432
433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 432

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



345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 345

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


332
333
334
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 332

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



338
339
340
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 338

def hash
  [processors, amex_vendor_code, default_auth_type_code, master_card_assigned_id, enable_partial_auth, merchant_category_code, sic_code, food_and_consumer_service_id, enable_split_shipment, enable_interchange_optimization, visa_delegated_authentication_id, credit_card_refund_limit_percent, business_center_credit_card_refund_limit_percent, allow_captures_greater_than_authorizations, enable_duplicate_merchant_reference_number_blocking, domestic_merchant_id, process_level3_data, sub_merchant_id, sub_merchant_business_name, prefer_cobadged_secondary_brand, merchant_descriptor_information].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



279
280
281
282
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 279

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



412
413
414
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 412

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



418
419
420
421
422
423
424
425
426
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 418

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



406
407
408
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 406

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



286
287
288
289
290
# File 'lib/cybersource_rest_client/models/payments_products_card_processing_configuration_information_configurations_common.rb', line 286

def valid?
  default_auth_type_code_validator = EnumAttributeValidator.new('String', ['PRE', 'FINAL', 'UNDEFINED'])
  return false unless default_auth_type_code_validator.valid?(@default_auth_type_code)
  true
end