Class: CyberSource::CardProcessingConfigCommon

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

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



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
267
268
269
270
271
272
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 173

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> Possible values: - PRE - FINAL - UNDEFINED



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.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 85

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.



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 114

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.



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 143

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



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

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



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 353

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



419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 419

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



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 332

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


319
320
321
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 319

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



325
326
327
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 325

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



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

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



399
400
401
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 399

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



405
406
407
408
409
410
411
412
413
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 405

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



393
394
395
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 393

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



283
284
285
# File 'lib/cybersource_rest_client/models/card_processing_config_common.rb', line 283

def valid?
  true
end