Class: CyberSourceMergedSpec::InstallmentInformation4
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::InstallmentInformation4
- Defined in:
- lib/cyber_source_merged_spec/models/installment_information4.rb
Overview
InstallmentInformation4 Model.
Instance Attribute Summary collapse
-
#alert_preference ⇒ String
Applicable only for SI.
-
#first_installment_date ⇒ String
Date of the first installment payment.
-
#identifier ⇒ String
Standing Instruction/Installment identifier.
-
#last_installment_date ⇒ String
End date of the SI transactions.
-
#max_amount ⇒ String
Maximum Amount for which SI can be initiated.
-
#min_amount ⇒ String
Minimum Amount for which SI can be initiated.
-
#payment_type ⇒ String
Payment plan for the installments.
-
#preferred_day ⇒ String
Preferred date for initiating the SI transaction every month.
-
#sequence ⇒ Integer
Installment number when making payments in installments.
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(alert_preference: SKIP, first_installment_date: SKIP, identifier: SKIP, last_installment_date: SKIP, max_amount: SKIP, min_amount: SKIP, payment_type: SKIP, preferred_day: SKIP, sequence: SKIP, additional_properties: nil) ⇒ InstallmentInformation4
constructor
A new instance of InstallmentInformation4.
-
#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(alert_preference: SKIP, first_installment_date: SKIP, identifier: SKIP, last_installment_date: SKIP, max_amount: SKIP, min_amount: SKIP, payment_type: SKIP, preferred_day: SKIP, sequence: SKIP, additional_properties: nil) ⇒ InstallmentInformation4
Returns a new instance of InstallmentInformation4.
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 148 def initialize(alert_preference: SKIP, first_installment_date: SKIP, identifier: SKIP, last_installment_date: SKIP, max_amount: SKIP, min_amount: SKIP, payment_type: SKIP, preferred_day: SKIP, sequence: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @alert_preference = alert_preference unless alert_preference == SKIP @first_installment_date = first_installment_date unless first_installment_date == SKIP @identifier = identifier unless identifier == SKIP @last_installment_date = last_installment_date unless last_installment_date == SKIP @max_amount = max_amount unless max_amount == SKIP @min_amount = min_amount unless min_amount == SKIP @payment_type = payment_type unless payment_type == SKIP @preferred_day = preferred_day unless preferred_day == SKIP @sequence = sequence unless sequence == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#alert_preference ⇒ String
Applicable only for SI. Required in case the authentication is initiated for SI registration. Valid Values:
SMSEMAILBOTH
19 20 21 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 19 def alert_preference @alert_preference end |
#first_installment_date ⇒ String
Date of the first installment payment. Format: YYMMDD. When you do not include this field, CyberSource sends a string of six zeros (000000) to the processor. This field is supported only for Crediario installment payments in Brazil on CyberSource through VisaNet. The value for this field corresponds to the following data in the TC 33 capture file:
- Record: CP01 TCR9
- Position: 42-47
- Field: Date of First Installment
32 33 34 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 32 def first_installment_date @first_installment_date end |
#identifier ⇒ String
Standing Instruction/Installment identifier.
36 37 38 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 36 def identifier @identifier end |
#last_installment_date ⇒ String
End date of the SI transactions. Cannot be later than card expiry date. Ideally this can be set to expiry date. Required in case the authentication is initiated for SI registration.
43 44 45 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 43 def last_installment_date @last_installment_date end |
#max_amount ⇒ String
Maximum Amount for which SI can be initiated. Required in case the authentication is initiated for SI registration.
48 49 50 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 48 def max_amount @max_amount end |
#min_amount ⇒ String
Minimum Amount for which SI can be initiated. Required in case the authentication is initiated for SI registration.
53 54 55 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 53 def min_amount @min_amount end |
#payment_type ⇒ String
Payment plan for the installments. This field is supported only for installment payments on Visa Platform Connect, RuPay and SPG-KSA seamless flow. Possible values for a standing-instruction (SI) merchant-initiated transaction (MIT) with Diners Club or Mastercard in India or with an India-issued card:
- 1: SI with a fixed amount.
- 2: SI with a maximum amount.
- 3: Other kind of SI. Possible values for a type of Installment transaction for on-soil transaction in Kingdom of Saudi Arabia
- 1: Registration or first transaction.
- 2: Subsequent transaction. Possible values for other kinds of installment payments:
- 0 (default): Regular installment. This value is not allowed for airline transactions.
- 1: Installment payment with down payment.
- 2: Installment payment without down payment. This value is supported only for airline transactions.
- 3: Installment payment; down payment and boarding fee will follow. This value is supported only for airline transactions.
- 4: Down payment only; regular installment payment will follow.
- 5: Boarding fee only. This value is supported only for airline transactions.
- 6: SI de-registration on RuPay for the payer authentication seamless flow.
82 83 84 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 82 def payment_type @payment_type end |
#preferred_day ⇒ String
Preferred date for initiating the SI transaction every month. This field need not be sent in case the SI has to be initiated as and when required, e.g., topping up the wallet, etc.
88 89 90 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 88 def preferred_day @preferred_day end |
#sequence ⇒ Integer
Installment number when making payments in installments. Used along with
totalCount to track which payment is being processed.
For example, the second of 5 payments would be passed to CyberSource as
sequence = 2 and totalCount = 5.
Chase Paymentech Solutions and FDC Compass
This field is optional because this value is required in the merchant descriptors.
CyberSource through VisaNet
When you do not include this field in a request for a Crediario installment payment, CyberSource sends a value of 0 to the processor. For Crediario installment payments, the value for this field corresponds to the following data in the TC 33 capture file*:
- Record: CP01 TCR9
- Position: 38-40
- Field: Installment Payment Number
- The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to CyberSource. CyberSource through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant’s acquirer, who uses this information to facilitate end-of-day clearing processing with payment card companies.
111 112 113 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 111 def sequence @sequence end |
Class Method Details
.from_element(root) ⇒ Object
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 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 206 def self.from_element(root) alert_preference = XmlUtilities.from_element(root, 'alertPreference', String) first_installment_date = XmlUtilities.from_element(root, 'firstInstallmentDate', String) identifier = XmlUtilities.from_element(root, 'identifier', String) last_installment_date = XmlUtilities.from_element(root, 'lastInstallmentDate', String) max_amount = XmlUtilities.from_element(root, 'maxAmount', String) min_amount = XmlUtilities.from_element(root, 'minAmount', String) payment_type = XmlUtilities.from_element(root, 'paymentType', String) preferred_day = XmlUtilities.from_element(root, 'preferredDay', String) sequence = XmlUtilities.from_element(root, 'sequence', Integer) new(alert_preference: alert_preference, first_installment_date: first_installment_date, identifier: identifier, last_installment_date: last_installment_date, max_amount: max_amount, min_amount: min_amount, payment_type: payment_type, preferred_day: preferred_day, sequence: sequence, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 169 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. alert_preference = hash.key?('alertPreference') ? hash['alertPreference'] : SKIP first_installment_date = hash.key?('firstInstallmentDate') ? hash['firstInstallmentDate'] : SKIP identifier = hash.key?('identifier') ? hash['identifier'] : SKIP last_installment_date = hash.key?('lastInstallmentDate') ? hash['lastInstallmentDate'] : SKIP max_amount = hash.key?('maxAmount') ? hash['maxAmount'] : SKIP min_amount = hash.key?('minAmount') ? hash['minAmount'] : SKIP payment_type = hash.key?('paymentType') ? hash['paymentType'] : SKIP preferred_day = hash.key?('preferredDay') ? hash['preferredDay'] : SKIP sequence = hash.key?('sequence') ? hash['sequence'] : 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. InstallmentInformation4.new(alert_preference: alert_preference, first_installment_date: first_installment_date, identifier: identifier, last_installment_date: last_installment_date, max_amount: max_amount, min_amount: min_amount, payment_type: payment_type, preferred_day: preferred_day, sequence: sequence, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 114 def self.names @_hash = {} if @_hash.nil? @_hash['alert_preference'] = 'alertPreference' @_hash['first_installment_date'] = 'firstInstallmentDate' @_hash['identifier'] = 'identifier' @_hash['last_installment_date'] = 'lastInstallmentDate' @_hash['max_amount'] = 'maxAmount' @_hash['min_amount'] = 'minAmount' @_hash['payment_type'] = 'paymentType' @_hash['preferred_day'] = 'preferredDay' @_hash['sequence'] = 'sequence' @_hash end |
.nullables ⇒ Object
An array for nullable fields
144 145 146 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 144 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 129 def self.optionals %w[ alert_preference first_installment_date identifier last_installment_date max_amount min_amount payment_type preferred_day sequence ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
266 267 268 269 270 271 272 273 274 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 266 def inspect class_name = self.class.name.split('::').last "<#{class_name} alert_preference: #{@alert_preference.inspect}, first_installment_date:"\ " #{@first_installment_date.inspect}, identifier: #{@identifier.inspect},"\ " last_installment_date: #{@last_installment_date.inspect}, max_amount:"\ " #{@max_amount.inspect}, min_amount: #{@min_amount.inspect}, payment_type:"\ " #{@payment_type.inspect}, preferred_day: #{@preferred_day.inspect}, sequence:"\ " #{@sequence.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
256 257 258 259 260 261 262 263 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 256 def to_s class_name = self.class.name.split('::').last "<#{class_name} alert_preference: #{@alert_preference}, first_installment_date:"\ " #{@first_installment_date}, identifier: #{@identifier}, last_installment_date:"\ " #{@last_installment_date}, max_amount: #{@max_amount}, min_amount: #{@min_amount},"\ " payment_type: #{@payment_type}, preferred_day: #{@preferred_day}, sequence: #{@sequence},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/cyber_source_merged_spec/models/installment_information4.rb', line 234 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'alertPreference', alert_preference) XmlUtilities.add_as_subelement(doc, root, 'firstInstallmentDate', first_installment_date) XmlUtilities.add_as_subelement(doc, root, 'identifier', identifier) XmlUtilities.add_as_subelement(doc, root, 'lastInstallmentDate', last_installment_date) XmlUtilities.add_as_subelement(doc, root, 'maxAmount', max_amount) XmlUtilities.add_as_subelement(doc, root, 'minAmount', min_amount) XmlUtilities.add_as_subelement(doc, root, 'paymentType', payment_type) XmlUtilities.add_as_subelement(doc, root, 'preferredDay', preferred_day) XmlUtilities.add_as_subelement(doc, root, 'sequence', sequence) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |