Class: CyberSourceMergedSpec::InstallmentInformation1

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

Overview

InstallmentInformation1 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(additional_costs: SKIP, additional_costs_percentage: SKIP, amount: SKIP, amount_funded: SKIP, amount_requested_percentage: SKIP, annual_financing_cost: SKIP, annual_interest_rate: SKIP, expenses: SKIP, expenses_percentage: SKIP, fees: SKIP, fees_percentage: SKIP, frequency: SKIP, insurance: SKIP, insurance_percentage: SKIP, invoice_data: SKIP, monthly_interest_rate: SKIP, plan_type: SKIP, sequence: SKIP, taxes: SKIP, taxes_percentage: SKIP, total_amount: SKIP, total_count: SKIP, minimum_total_count: SKIP, maximum_total_count: SKIP, first_installment_amount: SKIP, first_installment_date: SKIP, additional_properties: nil) ⇒ InstallmentInformation1

Returns a new instance of InstallmentInformation1.



531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 531

def initialize(additional_costs: SKIP, additional_costs_percentage: SKIP,
               amount: SKIP, amount_funded: SKIP,
               amount_requested_percentage: SKIP,
               annual_financing_cost: SKIP, annual_interest_rate: SKIP,
               expenses: SKIP, expenses_percentage: SKIP, fees: SKIP,
               fees_percentage: SKIP, frequency: SKIP, insurance: SKIP,
               insurance_percentage: SKIP, invoice_data: SKIP,
               monthly_interest_rate: SKIP, plan_type: SKIP, sequence: SKIP,
               taxes: SKIP, taxes_percentage: SKIP, total_amount: SKIP,
               total_count: SKIP, minimum_total_count: SKIP,
               maximum_total_count: SKIP, first_installment_amount: SKIP,
               first_installment_date: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @additional_costs = additional_costs unless additional_costs == SKIP
  unless additional_costs_percentage == SKIP
    @additional_costs_percentage =
      additional_costs_percentage
  end
  @amount = amount unless amount == SKIP
  @amount_funded = amount_funded unless amount_funded == SKIP
  unless amount_requested_percentage == SKIP
    @amount_requested_percentage =
      amount_requested_percentage
  end
  @annual_financing_cost = annual_financing_cost unless annual_financing_cost == SKIP
  @annual_interest_rate = annual_interest_rate unless annual_interest_rate == SKIP
  @expenses = expenses unless expenses == SKIP
  @expenses_percentage = expenses_percentage unless expenses_percentage == SKIP
  @fees = fees unless fees == SKIP
  @fees_percentage = fees_percentage unless fees_percentage == SKIP
  @frequency = frequency unless frequency == SKIP
  @insurance = insurance unless insurance == SKIP
  @insurance_percentage = insurance_percentage unless insurance_percentage == SKIP
  @invoice_data = invoice_data unless invoice_data == SKIP
  @monthly_interest_rate = monthly_interest_rate unless monthly_interest_rate == SKIP
  @plan_type = plan_type unless plan_type == SKIP
  @sequence = sequence unless sequence == SKIP
  @taxes = taxes unless taxes == SKIP
  @taxes_percentage = taxes_percentage unless taxes_percentage == SKIP
  @total_amount = total_amount unless total_amount == SKIP
  @total_count = total_count unless total_count == SKIP
  @minimum_total_count = minimum_total_count unless minimum_total_count == SKIP
  @maximum_total_count = maximum_total_count unless maximum_total_count == SKIP
  @first_installment_amount = first_installment_amount unless first_installment_amount == SKIP
  @first_installment_date = first_installment_date unless first_installment_date == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#additional_costsString

Additional costs charged by the issuer to fund the installment payments. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:

  • Record: CP01 TCR9
  • Position: 128-139
  • Field: Total Other Costs

Returns:

  • (String)


24
25
26
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 24

def additional_costs
  @additional_costs
end

#additional_costs_percentageString

Additional costs divided by the amount funded. For example:

  • A value of 1.0 specifies 1%.
  • A value of 4.0 specifies 4%. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:
  • Record: CP01 TCR9
  • Position: 140-143
  • Field: Percent of Total Other Costs

Returns:

  • (String)


41
42
43
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 41

def additional_costs_percentage
  @additional_costs_percentage
end

#amountString

Amount for the current installment payment. This field is supported only for CyberSource through VisaNet.

Returns:

  • (String)


46
47
48
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 46

def amount
  @amount
end

#amount_fundedString

Amount funded. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:

  • Record: CP01 TCR9
  • Position: 48-59
  • Field: Total Amount Funded

Returns:

  • (String)


60
61
62
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 60

def amount_funded
  @amount_funded
end

#amount_requested_percentageString

Amount requested divided by the amount funded. For example:

  • A value of 90.0 specifies 90%.
  • A value of 93.7 specifies 93.7%. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:
  • Record: CP01 TCR9
  • Position: 60-63
  • Field: Percent of Amount Requested

Returns:

  • (String)


77
78
79
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 77

def amount_requested_percentage
  @amount_requested_percentage
end

#annual_financing_costString

Annual cost of financing the installment payments. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:

  • Record: CP01 TCR9
  • Position: 158-164
  • Field: Annual Total Cost of Financing

Returns:

  • (String)


91
92
93
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 91

def annual_financing_cost
  @annual_financing_cost
end

#annual_interest_rateString

Annual interest rate. This field is returned only for two kinds of installment payments on Visa Platform Connect:

  • Crediario with Visa in Brazil: this field is included in the authorization response for the Crediario eligibility request when the issuer approves the customer's request for Crediario installment payments.
  • Mastercard in all countries except Brazil, Croatia, Georgia, and Greece. Example: A value of 1.0 specifies 1%. Example: A value of 4.0 specifies 4%.

Brazil

The value for this field corresponds to the following data in the TC 33 capture file:

  • Record: CP01 TCR9
  • Position: 151-157
  • Field: Annual Interest Rate

Other Countries

The value for this field corresponds to the following data in the TC 33 capture file:

  • Record: CP01 TCR5
  • Position: 58-62 SCMP API Fields| 216
  • Field: Mastercard Annual Percentage Rate

Returns:

  • (String)


115
116
117
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 115

def annual_interest_rate
  @annual_interest_rate
end

#expensesString

Expenses charged by the issuer to fund the installment payments. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:

  • Record: CP01 TCR9
  • Position: 64-75
  • Field: Total Expenses

Returns:

  • (String)


129
130
131
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 129

def expenses
  @expenses
end

#expenses_percentageString

Expenses divided by the amount funded. For example:

  • A value of 1.0 specifies 1%.
  • A value of 4.0 specifies 4%. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:
  • Record: CP01 TCR9
  • Position: 76-79
  • Field: Percent of Total Expenses

Returns:

  • (String)


146
147
148
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 146

def expenses_percentage
  @expenses_percentage
end

#feesString

Fees charged by the issuer to fund the installment payments. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:

  • Record: CP01 TCR9
  • Position: 80-91
  • Field: Total Fees

Returns:

  • (String)


160
161
162
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 160

def fees
  @fees
end

#fees_percentageString

Fees divided by the amount funded. For example:

  • A value of 1.0 specifies 1%.
  • A value of 4.0 specifies 4%. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:
  • Record: CP01 TCR9
  • Position: 92-95
  • Field: Percent of Total Fees

Returns:

  • (String)


177
178
179
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 177

def fees_percentage
  @fees_percentage
end

#first_installment_amountString

Amount of the first installment payment. The issuer provides this value when the first installment payment is successful. This field is supported for Mastercard installment payments on CyberSource through VisaNet in all countries except Brazil,Croatia, Georgia, and Greece. The value for this field corresponds to the following data in the TC 33 capture file:

  • Record: CP01 TCR5
  • Position: 23-34
  • Field: Amount of Each Installment

Returns:

  • (String)


447
448
449
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 447

def first_installment_amount
  @first_installment_amount
end

#first_installment_dateString

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

Returns:

  • (String)


460
461
462
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 460

def first_installment_date
  @first_installment_date
end

#frequencyString

Frequency of the installment payments. When you do not include this field in a request for a Crediario installment payment, CyberSource sends a space character to the processor. This field is supported only for CyberSource through VisaNet. Possible values:

  • B: Biweekly
  • M: Monthly
  • W: Weekly For Crediario installment payments, the value for this field corresponds to the following data in the TC 33 capture file5:
  • Record: CP01 TCR9
  • Position: 41
  • Field: Installment Frequency

Returns:

  • (String)


194
195
196
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 194

def frequency
  @frequency
end

#insuranceString

Insurance charged by the issuer to fund the installment payments. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:

  • Record: CP01 TCR9
  • Position: 112-123
  • Field: Total Insurance

Returns:

  • (String)


208
209
210
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 208

def insurance
  @insurance
end

#insurance_percentageString

Insurance costs divided by the amount funded. For example:

  • A value of 1.0 specifies 1%.
  • A value of 4.0 specifies 4%. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:
  • Record: CP01 TCR9
  • Position: 124-127
  • Field: Percent Of Total Insurance

Returns:

  • (String)


225
226
227
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 225

def insurance_percentage
  @insurance_percentage
end

#invoice_dataString

Invoice information that you want to provide to the issuer. This value is similar to a tracking number and is the same for all installment payments for one purchase. This field is supported only for installment payments with Mastercard on CyberSource through VisaNet in Brazil. The value for this field corresponds to the following data in the TC 33 capture file5:

  • Record: CP07 TCR4
  • Position: 51-70
  • Field: Purchase Identification

Returns:

  • (String)


238
239
240
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 238

def invoice_data
  @invoice_data
end

#maximum_total_countString

Maximum number of installments offered by the issuer for this purchase. The issuer provides this value when the first installment payment is successful. This field is supported for installment payments with Mastercard on CyberSource through VisaNet in all countries except Brazil, Croatia, Georgia, and Greece. The value for this field corresponds to the following data in the TC 33 capture file1:

  • Record: CP01 TCR5
  • Position: 77-78
  • Field: Mastercard Maximum Number Of Installments

Returns:

  • (String)


434
435
436
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 434

def maximum_total_count
  @maximum_total_count
end

#minimum_total_countString

"Minimum number of installments offered by the issuer for this purchase. The issuer provides this value when the first installment payment is successful. This field is supported for installment payments with Mastercard on CyberSource through VisaNet in all countries except Brazil, Croatia, Georgia, and Greece. The value for this field corresponds to the following data in the TC 33 capture file:

  • Record: CP01 TCR5
  • Position: 75-76
  • Field: Mastercard Minimum Number Of Installments

Returns:

  • (String)


420
421
422
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 420

def minimum_total_count
  @minimum_total_count
end

#monthly_interest_rateString

Monthly interest rate. For example:

  • A value of 1.0 specifies 1%.
  • A value of 4.0 specifies 4%. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:
  • Record: CP01 TCR9
  • Position: 144-150
  • Field: Monthly Interest Rate

Returns:

  • (String)


255
256
257
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 255

def monthly_interest_rate
  @monthly_interest_rate
end

#plan_typeString

American Express Direct, Cielo, and CyberSource Latin American

Processing Flag that indicates the type of funding for the installment plan associated with the payment. Possible values:

  • 1: Merchant-funded installment plan
  • 2: Issuer-funded installment plan If you do not include this field in the request, CyberSource uses the value in your CyberSource account. To change the value in your CyberSource account, contact CyberSource Customer Service.

CyberSource through VisaNet and American Express

Defined code that indicates the type of installment plan for this transaction. Contact American Express for:

  • Information about the kinds of installment plans that American Express provides
  • Values for this field For installment payments with American Express in Brazil, the value for this field corresponds to the following data in the TC 33 capture file*:
  • Record: CP07 TCR3
  • Position: 5-6
  • Field: Plan Type
  • 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.

CyberSource through VisaNet with Visa or Mastercard

Flag indicating the type of funding for the installment plan associated with the payment. Possible values:

  • 1 or 01: Merchant-funded installment plan
  • 2 or 02: Issuer-funded installment plan
  • 43: Crediario installment plan—only with Visa in Brazil For installment payments with Visa in Brazil, the value for this field corresponds to the following data in the TC 33 capture file5:
  • Record: CP07 TCR1
  • Position: 5-6
  • Field: Installment Type For all other kinds of installment payments, the value for this field corresponds to the following data in the TC 33 capture file5:
  • Record: CP01 TCR5
  • Position: 39-40
  • Field: Installment Plan Type (Issuer or Merchant)

Returns:

  • (String)


303
304
305
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 303

def plan_type
  @plan_type
end

#sequenceInteger

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.

Returns:

  • (Integer)


326
327
328
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 326

def sequence
  @sequence
end

#taxesString

Taxes collected by the issuer to fund the installment payments. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:

  • Record: CP01 TCR9
  • Position: 96-107
  • Field: Total Taxes

Returns:

  • (String)


340
341
342
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 340

def taxes
  @taxes
end

#taxes_percentageString

Taxes divided by the amount funded. For example:

  • A value of 1.0 specifies 1%.
  • A value of 4.0 specifies 4%. This field is included in the authorization reply for the Crediario eligibility request when the issuer approves the cardholder's request for Crediario installment payments in Brazil. 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 file1:
  • Record: CP01 TCR9
  • Position: 108-111
  • Field: Percent of Total Taxes

Returns:

  • (String)


357
358
359
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 357

def taxes_percentage
  @taxes_percentage
end

#total_amountString

Total amount of the loan that is being paid in installments. This field is supported only for CyberSource through VisaNet.

Returns:

  • (String)


363
364
365
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 363

def total_amount
  @total_amount
end

#total_countInteger

Total number of installments when making payments in installments.

Chase Paymentech Solutions and FDC Compass

This field is optional because this value is required in the merchant descriptors.

American Express Direct, Cielo, and Comercio Latino

This value is the total number of installments you approved.

CyberSource Latin American Processing in Brazil

This value is the total number of installments that you approved. The default is 1.

All Other Processors

This value is used along with sequence 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.

CyberSource through VisaNet

For Crediario installment payments, the value for this field corresponds to the following data in the TC 33 capture file*:

  • Record: CP01 TCR9
  • Position: 23-25
  • Field: Number of Installments For installment payments with American Express in Brazil, the value for this field corresponds to the following data in the TC 33 capture file*:
  • Record: CP07 TCR3
  • Position: 7-8
  • Field: Number of Installments For installment payments with Visa in Brazil, the value for this field corresponds to the following data in the TC 33 capture file*:
  • Record: CP07 TCR1
  • Position: 7-8
  • Field: Number of Installments For all other kinds of installment payments, the value for this field corresponds to the following data in the TC 33 capture file*:
  • Record: CP01 TCR5
  • Position: 20-22
  • Field: Installment Total Count Note 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.

Returns:

  • (Integer)


406
407
408
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 406

def total_count
  @total_count
end

Class Method Details

.from_element(root) ⇒ Object



664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 664

def self.from_element(root)
  additional_costs = XmlUtilities.from_element(root, 'additionalCosts',
                                               String)
  additional_costs_percentage = XmlUtilities.from_element(
    root, 'additionalCostsPercentage', String
  )
  amount = XmlUtilities.from_element(root, 'amount', String)
  amount_funded = XmlUtilities.from_element(root, 'amountFunded', String)
  amount_requested_percentage = XmlUtilities.from_element(
    root, 'amountRequestedPercentage', String
  )
  annual_financing_cost = XmlUtilities.from_element(root,
                                                    'annualFinancingCost',
                                                    String)
  annual_interest_rate = XmlUtilities.from_element(root,
                                                   'annualInterestRate',
                                                   String)
  expenses = XmlUtilities.from_element(root, 'expenses', String)
  expenses_percentage = XmlUtilities.from_element(root,
                                                  'expensesPercentage',
                                                  String)
  fees = XmlUtilities.from_element(root, 'fees', String)
  fees_percentage = XmlUtilities.from_element(root, 'feesPercentage',
                                              String)
  frequency = XmlUtilities.from_element(root, 'frequency', String)
  insurance = XmlUtilities.from_element(root, 'insurance', String)
  insurance_percentage = XmlUtilities.from_element(root,
                                                   'insurancePercentage',
                                                   String)
  invoice_data = XmlUtilities.from_element(root, 'invoiceData', String)
  monthly_interest_rate = XmlUtilities.from_element(root,
                                                    'monthlyInterestRate',
                                                    String)
  plan_type = XmlUtilities.from_element(root, 'planType', String)
  sequence = XmlUtilities.from_element(root, 'sequence', Integer)
  taxes = XmlUtilities.from_element(root, 'taxes', String)
  taxes_percentage = XmlUtilities.from_element(root, 'taxesPercentage',
                                               String)
  total_amount = XmlUtilities.from_element(root, 'totalAmount', String)
  total_count = XmlUtilities.from_element(root, 'totalCount', Integer)
  minimum_total_count = XmlUtilities.from_element(root, 'minimumTotalCount',
                                                  String)
  maximum_total_count = XmlUtilities.from_element(root, 'maximumTotalCount',
                                                  String)
  first_installment_amount = XmlUtilities.from_element(
    root, 'firstInstallmentAmount', String
  )
  first_installment_date = XmlUtilities.from_element(root,
                                                     'firstInstallmentDate',
                                                     String)

  new(additional_costs: additional_costs,
      additional_costs_percentage: additional_costs_percentage,
      amount: amount,
      amount_funded: amount_funded,
      amount_requested_percentage: amount_requested_percentage,
      annual_financing_cost: annual_financing_cost,
      annual_interest_rate: annual_interest_rate,
      expenses: expenses,
      expenses_percentage: expenses_percentage,
      fees: fees,
      fees_percentage: fees_percentage,
      frequency: frequency,
      insurance: insurance,
      insurance_percentage: insurance_percentage,
      invoice_data: invoice_data,
      monthly_interest_rate: monthly_interest_rate,
      plan_type: plan_type,
      sequence: sequence,
      taxes: taxes,
      taxes_percentage: taxes_percentage,
      total_amount: total_amount,
      total_count: total_count,
      minimum_total_count: minimum_total_count,
      maximum_total_count: maximum_total_count,
      first_installment_amount: first_installment_amount,
      first_installment_date: first_installment_date,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 582

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  additional_costs =
    hash.key?('additionalCosts') ? hash['additionalCosts'] : SKIP
  additional_costs_percentage =
    hash.key?('additionalCostsPercentage') ? hash['additionalCostsPercentage'] : SKIP
  amount = hash.key?('amount') ? hash['amount'] : SKIP
  amount_funded = hash.key?('amountFunded') ? hash['amountFunded'] : SKIP
  amount_requested_percentage =
    hash.key?('amountRequestedPercentage') ? hash['amountRequestedPercentage'] : SKIP
  annual_financing_cost =
    hash.key?('annualFinancingCost') ? hash['annualFinancingCost'] : SKIP
  annual_interest_rate =
    hash.key?('annualInterestRate') ? hash['annualInterestRate'] : SKIP
  expenses = hash.key?('expenses') ? hash['expenses'] : SKIP
  expenses_percentage =
    hash.key?('expensesPercentage') ? hash['expensesPercentage'] : SKIP
  fees = hash.key?('fees') ? hash['fees'] : SKIP
  fees_percentage =
    hash.key?('feesPercentage') ? hash['feesPercentage'] : SKIP
  frequency = hash.key?('frequency') ? hash['frequency'] : SKIP
  insurance = hash.key?('insurance') ? hash['insurance'] : SKIP
  insurance_percentage =
    hash.key?('insurancePercentage') ? hash['insurancePercentage'] : SKIP
  invoice_data = hash.key?('invoiceData') ? hash['invoiceData'] : SKIP
  monthly_interest_rate =
    hash.key?('monthlyInterestRate') ? hash['monthlyInterestRate'] : SKIP
  plan_type = hash.key?('planType') ? hash['planType'] : SKIP
  sequence = hash.key?('sequence') ? hash['sequence'] : SKIP
  taxes = hash.key?('taxes') ? hash['taxes'] : SKIP
  taxes_percentage =
    hash.key?('taxesPercentage') ? hash['taxesPercentage'] : SKIP
  total_amount = hash.key?('totalAmount') ? hash['totalAmount'] : SKIP
  total_count = hash.key?('totalCount') ? hash['totalCount'] : SKIP
  minimum_total_count =
    hash.key?('minimumTotalCount') ? hash['minimumTotalCount'] : SKIP
  maximum_total_count =
    hash.key?('maximumTotalCount') ? hash['maximumTotalCount'] : SKIP
  first_installment_amount =
    hash.key?('firstInstallmentAmount') ? hash['firstInstallmentAmount'] : SKIP
  first_installment_date =
    hash.key?('firstInstallmentDate') ? hash['firstInstallmentDate'] : 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.
  InstallmentInformation1.new(additional_costs: additional_costs,
                              additional_costs_percentage: additional_costs_percentage,
                              amount: amount,
                              amount_funded: amount_funded,
                              amount_requested_percentage: amount_requested_percentage,
                              annual_financing_cost: annual_financing_cost,
                              annual_interest_rate: annual_interest_rate,
                              expenses: expenses,
                              expenses_percentage: expenses_percentage,
                              fees: fees,
                              fees_percentage: fees_percentage,
                              frequency: frequency,
                              insurance: insurance,
                              insurance_percentage: insurance_percentage,
                              invoice_data: invoice_data,
                              monthly_interest_rate: monthly_interest_rate,
                              plan_type: plan_type,
                              sequence: sequence,
                              taxes: taxes,
                              taxes_percentage: taxes_percentage,
                              total_amount: total_amount,
                              total_count: total_count,
                              minimum_total_count: minimum_total_count,
                              maximum_total_count: maximum_total_count,
                              first_installment_amount: first_installment_amount,
                              first_installment_date: first_installment_date,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 463

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['additional_costs'] = 'additionalCosts'
  @_hash['additional_costs_percentage'] = 'additionalCostsPercentage'
  @_hash['amount'] = 'amount'
  @_hash['amount_funded'] = 'amountFunded'
  @_hash['amount_requested_percentage'] = 'amountRequestedPercentage'
  @_hash['annual_financing_cost'] = 'annualFinancingCost'
  @_hash['annual_interest_rate'] = 'annualInterestRate'
  @_hash['expenses'] = 'expenses'
  @_hash['expenses_percentage'] = 'expensesPercentage'
  @_hash['fees'] = 'fees'
  @_hash['fees_percentage'] = 'feesPercentage'
  @_hash['frequency'] = 'frequency'
  @_hash['insurance'] = 'insurance'
  @_hash['insurance_percentage'] = 'insurancePercentage'
  @_hash['invoice_data'] = 'invoiceData'
  @_hash['monthly_interest_rate'] = 'monthlyInterestRate'
  @_hash['plan_type'] = 'planType'
  @_hash['sequence'] = 'sequence'
  @_hash['taxes'] = 'taxes'
  @_hash['taxes_percentage'] = 'taxesPercentage'
  @_hash['total_amount'] = 'totalAmount'
  @_hash['total_count'] = 'totalCount'
  @_hash['minimum_total_count'] = 'minimumTotalCount'
  @_hash['maximum_total_count'] = 'maximumTotalCount'
  @_hash['first_installment_amount'] = 'firstInstallmentAmount'
  @_hash['first_installment_date'] = 'firstInstallmentDate'
  @_hash
end

.nullablesObject

An array for nullable fields



527
528
529
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 527

def self.nullables
  []
end

.optionalsObject

An array for optional fields



495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 495

def self.optionals
  %w[
    additional_costs
    additional_costs_percentage
    amount
    amount_funded
    amount_requested_percentage
    annual_financing_cost
    annual_interest_rate
    expenses
    expenses_percentage
    fees
    fees_percentage
    frequency
    insurance
    insurance_percentage
    invoice_data
    monthly_interest_rate
    plan_type
    sequence
    taxes
    taxes_percentage
    total_amount
    total_count
    minimum_total_count
    maximum_total_count
    first_installment_amount
    first_installment_date
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 812

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} additional_costs: #{@additional_costs.inspect},"\
  " additional_costs_percentage: #{@additional_costs_percentage.inspect}, amount:"\
  " #{@amount.inspect}, amount_funded: #{@amount_funded.inspect}, amount_requested_percentage:"\
  " #{@amount_requested_percentage.inspect}, annual_financing_cost:"\
  " #{@annual_financing_cost.inspect}, annual_interest_rate: #{@annual_interest_rate.inspect},"\
  " expenses: #{@expenses.inspect}, expenses_percentage: #{@expenses_percentage.inspect},"\
  " fees: #{@fees.inspect}, fees_percentage: #{@fees_percentage.inspect}, frequency:"\
  " #{@frequency.inspect}, insurance: #{@insurance.inspect}, insurance_percentage:"\
  " #{@insurance_percentage.inspect}, invoice_data: #{@invoice_data.inspect},"\
  " monthly_interest_rate: #{@monthly_interest_rate.inspect}, plan_type:"\
  " #{@plan_type.inspect}, sequence: #{@sequence.inspect}, taxes: #{@taxes.inspect},"\
  " taxes_percentage: #{@taxes_percentage.inspect}, total_amount: #{@total_amount.inspect},"\
  " total_count: #{@total_count.inspect}, minimum_total_count:"\
  " #{@minimum_total_count.inspect}, maximum_total_count: #{@maximum_total_count.inspect},"\
  " first_installment_amount: #{@first_installment_amount.inspect}, first_installment_date:"\
  " #{@first_installment_date.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 794

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} additional_costs: #{@additional_costs}, additional_costs_percentage:"\
  " #{@additional_costs_percentage}, amount: #{@amount}, amount_funded: #{@amount_funded},"\
  " amount_requested_percentage: #{@amount_requested_percentage}, annual_financing_cost:"\
  " #{@annual_financing_cost}, annual_interest_rate: #{@annual_interest_rate}, expenses:"\
  " #{@expenses}, expenses_percentage: #{@expenses_percentage}, fees: #{@fees},"\
  " fees_percentage: #{@fees_percentage}, frequency: #{@frequency}, insurance: #{@insurance},"\
  " insurance_percentage: #{@insurance_percentage}, invoice_data: #{@invoice_data},"\
  " monthly_interest_rate: #{@monthly_interest_rate}, plan_type: #{@plan_type}, sequence:"\
  " #{@sequence}, taxes: #{@taxes}, taxes_percentage: #{@taxes_percentage}, total_amount:"\
  " #{@total_amount}, total_count: #{@total_count}, minimum_total_count:"\
  " #{@minimum_total_count}, maximum_total_count: #{@maximum_total_count},"\
  " first_installment_amount: #{@first_installment_amount}, first_installment_date:"\
  " #{@first_installment_date}, additional_properties: #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
# File 'lib/cyber_source_merged_spec/models/installment_information1.rb', line 744

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

  XmlUtilities.add_as_subelement(doc, root, 'additionalCosts',
                                 additional_costs)
  XmlUtilities.add_as_subelement(doc, root, 'additionalCostsPercentage',
                                 additional_costs_percentage)
  XmlUtilities.add_as_subelement(doc, root, 'amount', amount)
  XmlUtilities.add_as_subelement(doc, root, 'amountFunded', amount_funded)
  XmlUtilities.add_as_subelement(doc, root, 'amountRequestedPercentage',
                                 amount_requested_percentage)
  XmlUtilities.add_as_subelement(doc, root, 'annualFinancingCost',
                                 annual_financing_cost)
  XmlUtilities.add_as_subelement(doc, root, 'annualInterestRate',
                                 annual_interest_rate)
  XmlUtilities.add_as_subelement(doc, root, 'expenses', expenses)
  XmlUtilities.add_as_subelement(doc, root, 'expensesPercentage',
                                 expenses_percentage)
  XmlUtilities.add_as_subelement(doc, root, 'fees', fees)
  XmlUtilities.add_as_subelement(doc, root, 'feesPercentage',
                                 fees_percentage)
  XmlUtilities.add_as_subelement(doc, root, 'frequency', frequency)
  XmlUtilities.add_as_subelement(doc, root, 'insurance', insurance)
  XmlUtilities.add_as_subelement(doc, root, 'insurancePercentage',
                                 insurance_percentage)
  XmlUtilities.add_as_subelement(doc, root, 'invoiceData', invoice_data)
  XmlUtilities.add_as_subelement(doc, root, 'monthlyInterestRate',
                                 monthly_interest_rate)
  XmlUtilities.add_as_subelement(doc, root, 'planType', plan_type)
  XmlUtilities.add_as_subelement(doc, root, 'sequence', sequence)
  XmlUtilities.add_as_subelement(doc, root, 'taxes', taxes)
  XmlUtilities.add_as_subelement(doc, root, 'taxesPercentage',
                                 taxes_percentage)
  XmlUtilities.add_as_subelement(doc, root, 'totalAmount', total_amount)
  XmlUtilities.add_as_subelement(doc, root, 'totalCount', total_count)
  XmlUtilities.add_as_subelement(doc, root, 'minimumTotalCount',
                                 minimum_total_count)
  XmlUtilities.add_as_subelement(doc, root, 'maximumTotalCount',
                                 maximum_total_count)
  XmlUtilities.add_as_subelement(doc, root, 'firstInstallmentAmount',
                                 first_installment_amount)
  XmlUtilities.add_as_subelement(doc, root, 'firstInstallmentDate',
                                 first_installment_date)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end