Class: CyberSourceMergedSpec::BillTo74

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/cyber_source_merged_spec/models/bill_to74.rb

Overview

BillTo74 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(first_name: SKIP, last_name: SKIP, address1: SKIP, email: SKIP, country: SKIP, phone_number: SKIP, additional_properties: nil) ⇒ BillTo74

Returns a new instance of BillTo74.



284
285
286
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 284

def initialize(first_name: SKIP, last_name: SKIP, address1: SKIP,
               email: SKIP, country: SKIP, phone_number: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @first_name = first_name unless first_name == SKIP
  @last_name = last_name unless last_name == SKIP
  @address1 = address1 unless address1 == SKIP
  @email = email unless email == SKIP
  @country = country unless country == SKIP
  @phone_number = phone_number unless phone_number == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#address1String

Payment card billing street address as it appears on the credit card issuer’s records.

SEPA

Required for Create Mandate and Import Mandate

Atos

This field must not contain colons (:).

CyberSource through VisaNet

Important When you populate orderInformation.billTo.address1 and orderInformation.billTo.address2, CyberSource through VisaNet concatenates the two values. If the concatenated value exceeds 40 characters, CyberSource through VisaNet truncates the value at 40 characters before sending it to Visa and the issuing bank. Truncating this value affects AVS results and therefore might also affect risk decisions and chargebacks. Credit card networks cannot process transactions that contain non-ASCII characters. CyberSource through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent CyberSource through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, CyberSource through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks.

FDMS Nashville

When the street name is numeric, it must be sent in numeric format. For example, if the address is One First Street, it must be sent as 1 1st Street. Required if keyed; not used if swiped. String (20)

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

All other processors:

Optional. String (60)

For Payouts

This field may be sent only for FDC Compass. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

Returns:

  • (String)


153
154
155
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 153

def address1
  @address1
end

#countryString

Payment card billing country. Use the two-character [ISO Standard Country Codes](http://apps.cybersource.com/library/documentation/sbc/quickref/coun tries_alpha_list.pdf).

SEPA/BACS

Required for Create Mandate and Import Mandate

CyberSource through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. CyberSource through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent CyberSource through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, CyberSource through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

OmniPay Direct

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


222
223
224
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 222

def country
  @country
end

#emailString

Customer's email address, including the full domain name.

CyberSource through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. CyberSource through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent CyberSource through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, CyberSource through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

Invoicing

Email address for the customer for sending the invoice. If the invoice is in SENT status and email is updated, the old email customer payment link won't work and you must resend the invoice with the new payment link.

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

OmniPay Direct

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


187
188
189
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 187

def email
  @email
end

#first_nameString

Customer’s first name. This name must be the same as the name on the card. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

SEPA

Required for Create Mandate and Import Mandate

BACS

Required for Import Mandate

CyberSource Latin American Processing

Important For an authorization request, CyberSource Latin American Processing concatenates orderInformation.billTo.firstName and orderInformation.billTo.lastName. If the concatenated value exceeds 30 characters, CyberSource Latin American Processing declines the authorization request.
Note CyberSource Latin American Processing is the name of a specific processing connection that CyberSource supports. In the CyberSource API documentation, CyberSource Latin American Processing does not refer to the general topic of processing in Latin America. The information in this field description is for the specific processing connection called CyberSource Latin American Processing. It is not for any other Latin American processors that CyberSource supports.

CyberSource through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. CyberSource through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent CyberSource through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, CyberSource through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks.

For Payouts:

This field may be sent only for FDC Compass.

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

OmniPay Direct

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


59
60
61
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 59

def first_name
  @first_name
end

#last_nameString

Customer’s last name. This name must be the same as the name on the card. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.

SEPA

Required for Create Mandate and Import Mandate

BACS

Required for Import Mandate

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

CyberSource Latin American Processing

Important For an authorization request, CyberSource Latin American Processing concatenates orderInformation.billTo.firstName and orderInformation.billTo.lastName. If the concatenated value exceeds 30 characters, CyberSource Latin American Processing declines the authorization request.
Note CyberSource Latin American Processing is the name of a specific processing connection that CyberSource supports. In the CyberSource API documentation, CyberSource Latin American Processing does not refer to the general topic of processing in Latin America. The information in this field description is for the specific processing connection called CyberSource Latin American Processing. It is not for any other Latin American processors that CyberSource supports.

CyberSource through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. CyberSource through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent CyberSource through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, CyberSource through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks.

For Payouts:

This field may be sent only for FDC Compass.

OmniPay Direct

Optional field.

RBS WorldPay Atlanta

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Required when processingInformation.billPaymentOptions.billPayment=true and pointOfSaleInformation.entryMode=keyed.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


110
111
112
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 110

def last_name
  @last_name
end

#phone_numberString

Customer’s phone number. It is recommended that you include the country code when the order is from outside the U.S.

Chase Paymentech Solutions

Optional field.

Credit Mutuel-CIC

Optional field.

CyberSource through VisaNet

Credit card networks cannot process transactions that contain non-ASCII characters. CyberSource through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent CyberSource through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, CyberSource through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks.

For Payouts:

This field may be sent only for FDC Compass.

OmniPay Direct

Optional field.

SIX

Optional field.

TSYS Acquiring Solutions

Optional field.

Worldpay VAP

Optional field.

All other processors

Not used.

Returns:

  • (String)


253
254
255
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 253

def phone_number
  @phone_number
end

Class Method Details

.from_element(root) ⇒ Object



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

def self.from_element(root)
  first_name = XmlUtilities.from_element(root, 'firstName', String)
  last_name = XmlUtilities.from_element(root, 'lastName', String)
  address1 = XmlUtilities.from_element(root, 'address1', String)
  email = XmlUtilities.from_element(root, 'email', String)
  country = XmlUtilities.from_element(root, 'country', String)
  phone_number = XmlUtilities.from_element(root, 'phoneNumber', String)

  new(first_name: first_name,
      last_name: last_name,
      address1: address1,
      email: email,
      country: country,
      phone_number: phone_number,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 300

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  first_name = hash.key?('firstName') ? hash['firstName'] : SKIP
  last_name = hash.key?('lastName') ? hash['lastName'] : SKIP
  address1 = hash.key?('address1') ? hash['address1'] : SKIP
  email = hash.key?('email') ? hash['email'] : SKIP
  country = hash.key?('country') ? hash['country'] : SKIP
  phone_number = hash.key?('phoneNumber') ? hash['phoneNumber'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  BillTo74.new(first_name: first_name,
               last_name: last_name,
               address1: address1,
               email: email,
               country: country,
               phone_number: phone_number,
               additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



256
257
258
259
260
261
262
263
264
265
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 256

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['first_name'] = 'firstName'
  @_hash['last_name'] = 'lastName'
  @_hash['address1'] = 'address1'
  @_hash['email'] = 'email'
  @_hash['country'] = 'country'
  @_hash['phone_number'] = 'phoneNumber'
  @_hash
end

.nullablesObject

An array for nullable fields



280
281
282
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 280

def self.nullables
  []
end

.optionalsObject

An array for optional fields



268
269
270
271
272
273
274
275
276
277
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 268

def self.optionals
  %w[
    first_name
    last_name
    address1
    email
    country
    phone_number
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



369
370
371
372
373
374
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 369

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} first_name: #{@first_name.inspect}, last_name: #{@last_name.inspect},"\
  " address1: #{@address1.inspect}, email: #{@email.inspect}, country: #{@country.inspect},"\
  " phone_number: #{@phone_number.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



361
362
363
364
365
366
# File 'lib/cyber_source_merged_spec/models/bill_to74.rb', line 361

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} first_name: #{@first_name}, last_name: #{@last_name}, address1:"\
  " #{@address1}, email: #{@email}, country: #{@country}, phone_number: #{@phone_number},"\
  " additional_properties: #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



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

def to_xml_element(doc, root_name)
  root = doc.create_element(root_name)

  XmlUtilities.add_as_subelement(doc, root, 'firstName', first_name)
  XmlUtilities.add_as_subelement(doc, root, 'lastName', last_name)
  XmlUtilities.add_as_subelement(doc, root, 'address1', address1)
  XmlUtilities.add_as_subelement(doc, root, 'email', email)
  XmlUtilities.add_as_subelement(doc, root, 'country', country)
  XmlUtilities.add_as_subelement(doc, root, 'phoneNumber', phone_number)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end