Class: CyberSource::CardProcessingConfigCommon

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

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CardProcessingConfigCommon

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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/cybersource_rest_client/models/card_processing_config_common.rb', line 195

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

  if attributes.has_key?(:'governmentControlled')
    self.government_controlled = attributes[:'governmentControlled']
  end

  if attributes.has_key?(:'dropBillingInfo')
    self.drop_billing_info = attributes[:'dropBillingInfo']
  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.



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

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.



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

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.



53
54
55
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 53

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.



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

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>



23
24
25
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 23

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.



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

def domestic_merchant_id
  @domestic_merchant_id
end

#drop_billing_infoObject

This field is used to indicate whether the merchant wants to drop the billing information from the request. If this field is set to true, then the billing information will be dropped from the request. If this field is set to false, then the billing information will be sent in the request.



82
83
84
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 82

def drop_billing_info
  @drop_billing_info
end

#enable_duplicate_merchant_reference_number_blockingObject

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



59
60
61
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 59

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.



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

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>



29
30
31
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 29

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.



41
42
43
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 41

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.



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

def food_and_consumer_service_id
  @food_and_consumer_service_id
end

#government_controlledObject

Indicates whether the merchant is government controlled. Applicable for VPC processors.



79
80
81
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 79

def government_controlled
  @government_controlled
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.



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

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>



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

def merchant_category_code
  @merchant_category_code
end

#merchant_descriptor_informationObject

Returns the value of attribute merchant_descriptor_information.



76
77
78
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 76

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.



74
75
76
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 74

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>



65
66
67
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 65

def process_level3_data
  @process_level3_data
end

#processorsObject

e.g. * amexdirect * barclays2 * CUP * EFTPOS * fdiglobal * gpngsapv3 * 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;



17
18
19
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 17

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.



35
36
37
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 35

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>



71
72
73
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 71

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>



68
69
70
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 68

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.



47
48
49
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 47

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.



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 107

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',
    :'government_controlled' => :'governmentControlled',
    :'drop_billing_info' => :'dropBillingInfo'
  }
end

.json_mapObject

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



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
162
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 136

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',
    :'government_controlled' => :'government_controlled',
    :'drop_billing_info' => :'drop_billing_info'
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    :'processors' => :'Hash<String, CardProcessingConfigCommonProcessors>',
    :'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' => :'CardProcessingConfigCommonMerchantDescriptorInformation',
    :'government_controlled' => :'BOOLEAN',
    :'drop_billing_info' => :'BOOLEAN'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

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 &&
      government_controlled == o.government_controlled &&
      drop_billing_info == o.drop_billing_info
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



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

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



453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 453

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



366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 366

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


353
354
355
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 353

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



359
360
361
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 359

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, government_controlled, drop_billing_info].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
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 298

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



433
434
435
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 433

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



439
440
441
442
443
444
445
446
447
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 439

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



427
428
429
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 427

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



305
306
307
308
309
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 305

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