Class: CyberSource::UnifiedriskMerchantMerchantDescriptor

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UnifiedriskMerchantMerchantDescriptor

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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

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?(:'name')
    self.name = attributes[:'name']
  end

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

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

  if attributes.has_key?(:'phoneNumber')
    self.phone_number = attributes[:'phoneNumber']
  end

  if attributes.has_key?(:'riskProfile')
    self.risk_profile = attributes[:'riskProfile']
  end

  if attributes.has_key?(:'authorizedSignatories')
    self.authorized_signatories = attributes[:'authorizedSignatories']
  end

  if attributes.has_key?(:'closeDate')
    self.close_date = attributes[:'closeDate']
  end

  if attributes.has_key?(:'countryIncorporated')
    self.country_incorporated = attributes[:'countryIncorporated']
  end

  if attributes.has_key?(:'creditScore')
    self.credit_score = attributes[:'creditScore']
  end

  if attributes.has_key?(:'dateOfEstablishment')
    self.date_of_establishment = attributes[:'dateOfEstablishment']
  end

  if attributes.has_key?(:'dateofOwnershipChange')
    self.dateof_ownership_change = attributes[:'dateofOwnershipChange']
  end

  if attributes.has_key?(:'ecommerceSupport')
    self.ecommerce_support = attributes[:'ecommerceSupport']
  end

  if attributes.has_key?(:'expectedAverageTicketSize')
    self.expected_average_ticket_size = attributes[:'expectedAverageTicketSize']
  end

  if attributes.has_key?(:'expectedAnnualSales')
    self.expected_annual_sales = attributes[:'expectedAnnualSales']
  end

  if attributes.has_key?(:'expectedMonthlySales')
    self.expected_monthly_sales = attributes[:'expectedMonthlySales']
  end

  if attributes.has_key?(:'limitType')
    self.limit_type = attributes[:'limitType']
  end

  if attributes.has_key?(:'limitValue')
    self.limit_value = attributes[:'limitValue']
  end

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

  if attributes.has_key?(:'primaryGoods')
    self.primary_goods = attributes[:'primaryGoods']
  end
end

Instance Attribute Details

#authorized_signatoriesObject

Names or identifiers of individuals authorized to sign agreements and take financial actions on behalf of the merchant entity



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

def authorized_signatories
  @authorized_signatories
end

#close_dateObject

The date the merchant account was or is scheduled to be closed, in ISO 8601 format (YYYY-MM-DD). Used for tracking merchant lifecycle events



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

def close_date
  @close_date
end

#country_incorporatedObject

The ISO 3166-1 alpha-3 country code where the merchant business is legally incorporated (e.g., GBR, USA, IND)



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

def country_incorporated
  @country_incorporated
end

#credit_scoreObject

The merchant's score as assessed by the acquirer or a credit bureau, used for underwriting and risk decisions during merchant onboarding



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

def credit_score
  @credit_score
end

#date_of_establishmentObject

The date the merchant's business was formally established or incorporated, in ISO 8601 format (YYYY-MM-DD). Used for business tenure risk assessment



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

def date_of_establishment
  @date_of_establishment
end

#dateof_ownership_changeObject

The date of the most recent ownership change for the merchant entity, in ISO 8601 format. Ownership changes can indicate elevated risk and require re-underwriting



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

def dateof_ownership_change
  @dateof_ownership_change
end

#ecommerce_supportObject

Indicates whether the merchant supports e-commerce transactions and the level of online payment capability (e.g., FULL, PARTIAL, NONE)



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

def ecommerce_support
  @ecommerce_support
end

#emailObject

Primary contact email address of the merchant, used for notifications, dispute communications, and merchant verification purposes



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

def email
  @email
end

#expected_annual_salesObject

Returns the value of attribute expected_annual_sales.



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

def expected_annual_sales
  @expected_annual_sales
end

#expected_average_ticket_sizeObject

Returns the value of attribute expected_average_ticket_size.



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

def expected_average_ticket_size
  @expected_average_ticket_size
end

#expected_monthly_salesObject

Returns the value of attribute expected_monthly_sales.



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

def expected_monthly_sales
  @expected_monthly_sales
end

#hierarchyObject

Returns the value of attribute hierarchy.



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

def hierarchy
  @hierarchy
end

#limit_typeObject

Defines the type of financial limit applied to the merchant (e.g., SINGLE_TRANSACTION, DAILY, MONTHLY, ANNUAL). Used to enforce risk controls during payment processing



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

def limit_type
  @limit_type
end

#limit_valueObject

Returns the value of attribute limit_value.



61
62
63
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 61

def limit_value
  @limit_value
end

#nameObject

Your merchant name.Note For Paymentech processor using Cybersource Payouts, the maximum data length is 22.#### PIN debit Your business name. This name is displayed on the cardholder's statement. When you include more than one consecutive space, extra spaces are removed.When you do not include this value in your PIN debit request, the merchant name from your account is used. Important This value must consist of English characters.Optional field for PIN debit credit or PIN debit pu



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

def name
  @name
end

#phone_numberObject

Primary phone number of the merchant in E.164 format (e.g., +14155552671), used for contact and identity verification



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

def phone_number
  @phone_number
end

#primary_goodsObject

The primary category of goods or services sold by the merchant (e.g., Electronics, Clothing, Travel Services). Used alongside MCC for granular risk profiling



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

def primary_goods
  @primary_goods
end

#risk_profileObject

Risk classification or category assigned to the merchant based on their industry, transaction patterns, and historical fraud rates (e.g., HIGH, MEDIUM, LOW)



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

def risk_profile
  @risk_profile
end

#urlObject

Address of company's website provided by merchant



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

def url
  @url
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    :'name' => :'name',
    :'url' => :'url',
    :'email' => :'email',
    :'phone_number' => :'phoneNumber',
    :'risk_profile' => :'riskProfile',
    :'authorized_signatories' => :'authorizedSignatories',
    :'close_date' => :'closeDate',
    :'country_incorporated' => :'countryIncorporated',
    :'credit_score' => :'creditScore',
    :'date_of_establishment' => :'dateOfEstablishment',
    :'dateof_ownership_change' => :'dateofOwnershipChange',
    :'ecommerce_support' => :'ecommerceSupport',
    :'expected_average_ticket_size' => :'expectedAverageTicketSize',
    :'expected_annual_sales' => :'expectedAnnualSales',
    :'expected_monthly_sales' => :'expectedMonthlySales',
    :'limit_type' => :'limitType',
    :'limit_value' => :'limitValue',
    :'hierarchy' => :'hierarchy',
    :'primary_goods' => :'primaryGoods'
  }
end

.json_mapObject

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



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 94

def self.json_map
  {
    :'name' => :'name',
    :'url' => :'url',
    :'email' => :'email',
    :'phone_number' => :'phone_number',
    :'risk_profile' => :'risk_profile',
    :'authorized_signatories' => :'authorized_signatories',
    :'close_date' => :'close_date',
    :'country_incorporated' => :'country_incorporated',
    :'credit_score' => :'credit_score',
    :'date_of_establishment' => :'date_of_establishment',
    :'dateof_ownership_change' => :'dateof_ownership_change',
    :'ecommerce_support' => :'ecommerce_support',
    :'expected_average_ticket_size' => :'expected_average_ticket_size',
    :'expected_annual_sales' => :'expected_annual_sales',
    :'expected_monthly_sales' => :'expected_monthly_sales',
    :'limit_type' => :'limit_type',
    :'limit_value' => :'limit_value',
    :'hierarchy' => :'hierarchy',
    :'primary_goods' => :'primary_goods'
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    :'name' => :'String',
    :'url' => :'String',
    :'email' => :'String',
    :'phone_number' => :'String',
    :'risk_profile' => :'String',
    :'authorized_signatories' => :'String',
    :'close_date' => :'String',
    :'country_incorporated' => :'String',
    :'credit_score' => :'Integer',
    :'date_of_establishment' => :'String',
    :'dateof_ownership_change' => :'String',
    :'ecommerce_support' => :'String',
    :'expected_average_ticket_size' => :'UnifiedriskMerchantMerchantDescriptorExpectedAverageTicketSize',
    :'expected_annual_sales' => :'UnifiedriskMerchantMerchantDescriptorExpectedAnnualSales',
    :'expected_monthly_sales' => :'UnifiedriskMerchantMerchantDescriptorExpectedMonthlySales',
    :'limit_type' => :'String',
    :'limit_value' => :'UnifiedriskMerchantMerchantDescriptorLimitValue',
    :'hierarchy' => :'UnifiedriskMerchantMerchantDescriptorHierarchy',
    :'primary_goods' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 249

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      name == o.name &&
      url == o.url &&
      email == o.email &&
      phone_number == o.phone_number &&
      risk_profile == o.risk_profile &&
      authorized_signatories == o.authorized_signatories &&
      close_date == o.close_date &&
      country_incorporated == o.country_incorporated &&
      credit_score == o.credit_score &&
      date_of_establishment == o.date_of_establishment &&
      dateof_ownership_change == o.dateof_ownership_change &&
      ecommerce_support == o.ecommerce_support &&
      expected_average_ticket_size == o.expected_average_ticket_size &&
      expected_annual_sales == o.expected_annual_sales &&
      expected_monthly_sales == o.expected_monthly_sales &&
      limit_type == o.limit_type &&
      limit_value == o.limit_value &&
      hierarchy == o.hierarchy &&
      primary_goods == o.primary_goods
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



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 309

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



375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 375

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



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 288

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


275
276
277
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 275

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



281
282
283
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 281

def hash
  [name, url, email, phone_number, risk_profile, authorized_signatories, close_date, country_incorporated, credit_score, date_of_establishment, dateof_ownership_change, ecommerce_support, expected_average_ticket_size, expected_annual_sales, expected_monthly_sales, limit_type, limit_value, hierarchy, primary_goods].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



230
231
232
233
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 230

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



355
356
357
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 355

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



361
362
363
364
365
366
367
368
369
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 361

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



349
350
351
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 349

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



237
238
239
# File 'lib/cybersource_rest_client/models/unifiedrisk_merchant_merchant_descriptor.rb', line 237

def valid?
  true
end