Class: CyberSourceMergedSpec::Account16
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::Account16
- Defined in:
- lib/cyber_source_merged_spec/models/account16.rb
Overview
Account16 Model.
Instance Attribute Summary collapse
-
#funds_source ⇒ String
Source of funds.
-
#number ⇒ String
The account number of the entity funding the transaction.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(funds_source: SKIP, number: SKIP, additional_properties: nil) ⇒ Account16
constructor
A new instance of Account16.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ Object
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(funds_source: SKIP, number: SKIP, additional_properties: nil) ⇒ Account16
Returns a new instance of Account16.
72 73 74 75 76 77 78 79 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 72 def initialize(funds_source: SKIP, number: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @funds_source = funds_source unless funds_source == SKIP @number = number unless number == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#funds_source ⇒ String
Source of funds. Possible values:
Paymentech, CTV, FDC Compass:
- 01: Credit card
- 02: Debit card
- 03: Prepaid card Paymentech, CTV -
- 04: Cash
- 05: Debit or deposit account that is not linked to a Visa card. Includes checking accounts, savings accounts, and proprietary debit or ATM cards.
- 06: Credit account that is not linked to a Visa card. Includes credit cards and proprietary lines of credit. FDCCompass -
- 04: Deposit Account Funds Disbursement This value is most likely 05 to identify that the originator used a deposit account to fund the disbursement. Credit Card Bill Payment This value must be 02, 03, 04, or 05.
34 35 36 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 34 def funds_source @funds_source end |
#number ⇒ String
The account number of the entity funding the transaction. It is the sender’s account number. It can be a debit/credit card account number or bank account number. Funds disbursements and OCT transactions This field is optional. All other transactions This field is required when the sender funds the transaction with a financial instrument, for example debit card. Length:
- FDCCompass (<= 19)
- Paymentech (<= 16)
49 50 51 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 49 def number @number end |
Class Method Details
.from_element(root) ⇒ Object
102 103 104 105 106 107 108 109 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 102 def self.from_element(root) funds_source = XmlUtilities.from_element(root, 'fundsSource', String) number = XmlUtilities.from_element(root, 'number', String) new(funds_source: funds_source, number: number, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 82 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. funds_source = hash.key?('fundsSource') ? hash['fundsSource'] : SKIP number = hash.key?('number') ? hash['number'] : 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. Account16.new(funds_source: funds_source, number: number, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
52 53 54 55 56 57 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 52 def self.names @_hash = {} if @_hash.nil? @_hash['funds_source'] = 'fundsSource' @_hash['number'] = 'number' @_hash end |
.nullables ⇒ Object
An array for nullable fields
68 69 70 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 68 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 60 def self.optionals %w[ funds_source number ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
130 131 132 133 134 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 130 def inspect class_name = self.class.name.split('::').last "<#{class_name} funds_source: #{@funds_source.inspect}, number: #{@number.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
123 124 125 126 127 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 123 def to_s class_name = self.class.name.split('::').last "<#{class_name} funds_source: #{@funds_source}, number: #{@number}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
111 112 113 114 115 116 117 118 119 120 |
# File 'lib/cyber_source_merged_spec/models/account16.rb', line 111 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'fundsSource', funds_source) XmlUtilities.add_as_subelement(doc, root, 'number', number) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |