<?php
/**
 * PtsV2PaymentsPost201ResponseInstallmentInformation
 *
 * PHP version 5
 *
 * @category Class
 * @package  CyberSource
 * @author   Swaagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * CyberSource Merged Spec
 *
 * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
 *
 * OpenAPI spec version: 0.0.1
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 *
 */
/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */

namespace CyberSource\Model;

use \ArrayAccess;

/**
 * PtsV2PaymentsPost201ResponseInstallmentInformation Class Doc Comment
 *
 * @category    Class
 * @package     CyberSource
 * @author      Swagger Codegen team
 * @link        https://github.com/swagger-api/swagger-codegen
 */
class PtsV2PaymentsPost201ResponseInstallmentInformation implements ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      * @var string
      */
    protected static $swaggerModelName = 'ptsV2PaymentsPost201Response_installmentInformation';

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'additionalCosts' => 'string',
        'additionalCostsPercentage' => 'string',
        'amount' => 'string',
        'amountFunded' => 'string',
        'amountRequestedPercentage' => 'string',
        'annualFinancingCost' => 'string',
        'annualInterestRate' => 'string',
        'expenses' => 'string',
        'expensesPercentage' => 'string',
        'fees' => 'string',
        'feesPercentage' => 'string',
        'frequency' => 'string',
        'insurance' => 'string',
        'insurancePercentage' => 'string',
        'invoiceData' => 'string',
        'monthlyInterestRate' => 'string',
        'planType' => 'string',
        'sequence' => 'int',
        'taxes' => 'string',
        'taxesPercentage' => 'string',
        'totalAmount' => 'string',
        'totalCount' => 'int',
        'minimumTotalCount' => 'string',
        'maximumTotalCount' => 'string',
        'firstInstallmentAmount' => 'string',
        'firstInstallmentDate' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerFormats = [
        'additionalCosts' => null,
        'additionalCostsPercentage' => null,
        'amount' => null,
        'amountFunded' => null,
        'amountRequestedPercentage' => null,
        'annualFinancingCost' => null,
        'annualInterestRate' => null,
        'expenses' => null,
        'expensesPercentage' => null,
        'fees' => null,
        'feesPercentage' => null,
        'frequency' => null,
        'insurance' => null,
        'insurancePercentage' => null,
        'invoiceData' => null,
        'monthlyInterestRate' => null,
        'planType' => null,
        'sequence' => null,
        'taxes' => null,
        'taxesPercentage' => null,
        'totalAmount' => null,
        'totalCount' => null,
        'minimumTotalCount' => null,
        'maximumTotalCount' => null,
        'firstInstallmentAmount' => null,
        'firstInstallmentDate' => null
    ];

    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    public static function swaggerFormats()
    {
        return self::$swaggerFormats;
    }

    /**
     * Array of attributes where the key is the local name, and the value is the original name
     * @var string[]
     */
    protected static $attributeMap = [
        'additionalCosts' => 'additionalCosts',
        'additionalCostsPercentage' => 'additionalCostsPercentage',
        'amount' => 'amount',
        'amountFunded' => 'amountFunded',
        'amountRequestedPercentage' => 'amountRequestedPercentage',
        'annualFinancingCost' => 'annualFinancingCost',
        'annualInterestRate' => 'annualInterestRate',
        'expenses' => 'expenses',
        'expensesPercentage' => 'expensesPercentage',
        'fees' => 'fees',
        'feesPercentage' => 'feesPercentage',
        'frequency' => 'frequency',
        'insurance' => 'insurance',
        'insurancePercentage' => 'insurancePercentage',
        'invoiceData' => 'invoiceData',
        'monthlyInterestRate' => 'monthlyInterestRate',
        'planType' => 'planType',
        'sequence' => 'sequence',
        'taxes' => 'taxes',
        'taxesPercentage' => 'taxesPercentage',
        'totalAmount' => 'totalAmount',
        'totalCount' => 'totalCount',
        'minimumTotalCount' => 'minimumTotalCount',
        'maximumTotalCount' => 'maximumTotalCount',
        'firstInstallmentAmount' => 'firstInstallmentAmount',
        'firstInstallmentDate' => 'firstInstallmentDate'
    ];


    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'additionalCosts' => 'setAdditionalCosts',
        'additionalCostsPercentage' => 'setAdditionalCostsPercentage',
        'amount' => 'setAmount',
        'amountFunded' => 'setAmountFunded',
        'amountRequestedPercentage' => 'setAmountRequestedPercentage',
        'annualFinancingCost' => 'setAnnualFinancingCost',
        'annualInterestRate' => 'setAnnualInterestRate',
        'expenses' => 'setExpenses',
        'expensesPercentage' => 'setExpensesPercentage',
        'fees' => 'setFees',
        'feesPercentage' => 'setFeesPercentage',
        'frequency' => 'setFrequency',
        'insurance' => 'setInsurance',
        'insurancePercentage' => 'setInsurancePercentage',
        'invoiceData' => 'setInvoiceData',
        'monthlyInterestRate' => 'setMonthlyInterestRate',
        'planType' => 'setPlanType',
        'sequence' => 'setSequence',
        'taxes' => 'setTaxes',
        'taxesPercentage' => 'setTaxesPercentage',
        'totalAmount' => 'setTotalAmount',
        'totalCount' => 'setTotalCount',
        'minimumTotalCount' => 'setMinimumTotalCount',
        'maximumTotalCount' => 'setMaximumTotalCount',
        'firstInstallmentAmount' => 'setFirstInstallmentAmount',
        'firstInstallmentDate' => 'setFirstInstallmentDate'
    ];


    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'additionalCosts' => 'getAdditionalCosts',
        'additionalCostsPercentage' => 'getAdditionalCostsPercentage',
        'amount' => 'getAmount',
        'amountFunded' => 'getAmountFunded',
        'amountRequestedPercentage' => 'getAmountRequestedPercentage',
        'annualFinancingCost' => 'getAnnualFinancingCost',
        'annualInterestRate' => 'getAnnualInterestRate',
        'expenses' => 'getExpenses',
        'expensesPercentage' => 'getExpensesPercentage',
        'fees' => 'getFees',
        'feesPercentage' => 'getFeesPercentage',
        'frequency' => 'getFrequency',
        'insurance' => 'getInsurance',
        'insurancePercentage' => 'getInsurancePercentage',
        'invoiceData' => 'getInvoiceData',
        'monthlyInterestRate' => 'getMonthlyInterestRate',
        'planType' => 'getPlanType',
        'sequence' => 'getSequence',
        'taxes' => 'getTaxes',
        'taxesPercentage' => 'getTaxesPercentage',
        'totalAmount' => 'getTotalAmount',
        'totalCount' => 'getTotalCount',
        'minimumTotalCount' => 'getMinimumTotalCount',
        'maximumTotalCount' => 'getMaximumTotalCount',
        'firstInstallmentAmount' => 'getFirstInstallmentAmount',
        'firstInstallmentDate' => 'getFirstInstallmentDate'
    ];

    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    public static function setters()
    {
        return self::$setters;
    }

    public static function getters()
    {
        return self::$getters;
    }

    

    

    /**
     * Associative array for storing property values
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     * @param mixed[] $data Associated array of property values initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['additionalCosts'] = isset($data['additionalCosts']) ? $data['additionalCosts'] : null;
        $this->container['additionalCostsPercentage'] = isset($data['additionalCostsPercentage']) ? $data['additionalCostsPercentage'] : null;
        $this->container['amount'] = isset($data['amount']) ? $data['amount'] : null;
        $this->container['amountFunded'] = isset($data['amountFunded']) ? $data['amountFunded'] : null;
        $this->container['amountRequestedPercentage'] = isset($data['amountRequestedPercentage']) ? $data['amountRequestedPercentage'] : null;
        $this->container['annualFinancingCost'] = isset($data['annualFinancingCost']) ? $data['annualFinancingCost'] : null;
        $this->container['annualInterestRate'] = isset($data['annualInterestRate']) ? $data['annualInterestRate'] : null;
        $this->container['expenses'] = isset($data['expenses']) ? $data['expenses'] : null;
        $this->container['expensesPercentage'] = isset($data['expensesPercentage']) ? $data['expensesPercentage'] : null;
        $this->container['fees'] = isset($data['fees']) ? $data['fees'] : null;
        $this->container['feesPercentage'] = isset($data['feesPercentage']) ? $data['feesPercentage'] : null;
        $this->container['frequency'] = isset($data['frequency']) ? $data['frequency'] : null;
        $this->container['insurance'] = isset($data['insurance']) ? $data['insurance'] : null;
        $this->container['insurancePercentage'] = isset($data['insurancePercentage']) ? $data['insurancePercentage'] : null;
        $this->container['invoiceData'] = isset($data['invoiceData']) ? $data['invoiceData'] : null;
        $this->container['monthlyInterestRate'] = isset($data['monthlyInterestRate']) ? $data['monthlyInterestRate'] : null;
        $this->container['planType'] = isset($data['planType']) ? $data['planType'] : null;
        $this->container['sequence'] = isset($data['sequence']) ? $data['sequence'] : null;
        $this->container['taxes'] = isset($data['taxes']) ? $data['taxes'] : null;
        $this->container['taxesPercentage'] = isset($data['taxesPercentage']) ? $data['taxesPercentage'] : null;
        $this->container['totalAmount'] = isset($data['totalAmount']) ? $data['totalAmount'] : null;
        $this->container['totalCount'] = isset($data['totalCount']) ? $data['totalCount'] : null;
        $this->container['minimumTotalCount'] = isset($data['minimumTotalCount']) ? $data['minimumTotalCount'] : null;
        $this->container['maximumTotalCount'] = isset($data['maximumTotalCount']) ? $data['maximumTotalCount'] : null;
        $this->container['firstInstallmentAmount'] = isset($data['firstInstallmentAmount']) ? $data['firstInstallmentAmount'] : null;
        $this->container['firstInstallmentDate'] = isset($data['firstInstallmentDate']) ? $data['firstInstallmentDate'] : null;
    }

    /**
     * show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalid_properties = [];

        return $invalid_properties;
    }

    /**
     * validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {

        return true;
    }


    /**
     * Gets additionalCosts
     * @return string
     */
    public function getAdditionalCosts()
    {
        return $this->container['additionalCosts'];
    }

    /**
     * Sets additionalCosts
     * @param string $additionalCosts 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
     * @return $this
     */
    public function setAdditionalCosts($additionalCosts)
    {
        $this->container['additionalCosts'] = $additionalCosts;

        return $this;
    }

    /**
     * Gets additionalCostsPercentage
     * @return string
     */
    public function getAdditionalCostsPercentage()
    {
        return $this->container['additionalCostsPercentage'];
    }

    /**
     * Sets additionalCostsPercentage
     * @param string $additionalCostsPercentage 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
     * @return $this
     */
    public function setAdditionalCostsPercentage($additionalCostsPercentage)
    {
        $this->container['additionalCostsPercentage'] = $additionalCostsPercentage;

        return $this;
    }

    /**
     * Gets amount
     * @return string
     */
    public function getAmount()
    {
        return $this->container['amount'];
    }

    /**
     * Sets amount
     * @param string $amount Amount for the current installment payment.  This field is supported only for CyberSource through VisaNet.
     * @return $this
     */
    public function setAmount($amount)
    {
        $this->container['amount'] = $amount;

        return $this;
    }

    /**
     * Gets amountFunded
     * @return string
     */
    public function getAmountFunded()
    {
        return $this->container['amountFunded'];
    }

    /**
     * Sets amountFunded
     * @param string $amountFunded 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
     * @return $this
     */
    public function setAmountFunded($amountFunded)
    {
        $this->container['amountFunded'] = $amountFunded;

        return $this;
    }

    /**
     * Gets amountRequestedPercentage
     * @return string
     */
    public function getAmountRequestedPercentage()
    {
        return $this->container['amountRequestedPercentage'];
    }

    /**
     * Sets amountRequestedPercentage
     * @param string $amountRequestedPercentage 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
     * @return $this
     */
    public function setAmountRequestedPercentage($amountRequestedPercentage)
    {
        $this->container['amountRequestedPercentage'] = $amountRequestedPercentage;

        return $this;
    }

    /**
     * Gets annualFinancingCost
     * @return string
     */
    public function getAnnualFinancingCost()
    {
        return $this->container['annualFinancingCost'];
    }

    /**
     * Sets annualFinancingCost
     * @param string $annualFinancingCost 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
     * @return $this
     */
    public function setAnnualFinancingCost($annualFinancingCost)
    {
        $this->container['annualFinancingCost'] = $annualFinancingCost;

        return $this;
    }

    /**
     * Gets annualInterestRate
     * @return string
     */
    public function getAnnualInterestRate()
    {
        return $this->container['annualInterestRate'];
    }

    /**
     * Sets annualInterestRate
     * @param string $annualInterestRate Annual 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: 151-157 - Field: Annual Interest Rate
     * @return $this
     */
    public function setAnnualInterestRate($annualInterestRate)
    {
        $this->container['annualInterestRate'] = $annualInterestRate;

        return $this;
    }

    /**
     * Gets expenses
     * @return string
     */
    public function getExpenses()
    {
        return $this->container['expenses'];
    }

    /**
     * Sets expenses
     * @param string $expenses 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
     * @return $this
     */
    public function setExpenses($expenses)
    {
        $this->container['expenses'] = $expenses;

        return $this;
    }

    /**
     * Gets expensesPercentage
     * @return string
     */
    public function getExpensesPercentage()
    {
        return $this->container['expensesPercentage'];
    }

    /**
     * Sets expensesPercentage
     * @param string $expensesPercentage 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
     * @return $this
     */
    public function setExpensesPercentage($expensesPercentage)
    {
        $this->container['expensesPercentage'] = $expensesPercentage;

        return $this;
    }

    /**
     * Gets fees
     * @return string
     */
    public function getFees()
    {
        return $this->container['fees'];
    }

    /**
     * Sets fees
     * @param string $fees 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
     * @return $this
     */
    public function setFees($fees)
    {
        $this->container['fees'] = $fees;

        return $this;
    }

    /**
     * Gets feesPercentage
     * @return string
     */
    public function getFeesPercentage()
    {
        return $this->container['feesPercentage'];
    }

    /**
     * Sets feesPercentage
     * @param string $feesPercentage 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
     * @return $this
     */
    public function setFeesPercentage($feesPercentage)
    {
        $this->container['feesPercentage'] = $feesPercentage;

        return $this;
    }

    /**
     * Gets frequency
     * @return string
     */
    public function getFrequency()
    {
        return $this->container['frequency'];
    }

    /**
     * Sets frequency
     * @param string $frequency 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
     * @return $this
     */
    public function setFrequency($frequency)
    {
        $this->container['frequency'] = $frequency;

        return $this;
    }

    /**
     * Gets insurance
     * @return string
     */
    public function getInsurance()
    {
        return $this->container['insurance'];
    }

    /**
     * Sets insurance
     * @param string $insurance 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
     * @return $this
     */
    public function setInsurance($insurance)
    {
        $this->container['insurance'] = $insurance;

        return $this;
    }

    /**
     * Gets insurancePercentage
     * @return string
     */
    public function getInsurancePercentage()
    {
        return $this->container['insurancePercentage'];
    }

    /**
     * Sets insurancePercentage
     * @param string $insurancePercentage 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
     * @return $this
     */
    public function setInsurancePercentage($insurancePercentage)
    {
        $this->container['insurancePercentage'] = $insurancePercentage;

        return $this;
    }

    /**
     * Gets invoiceData
     * @return string
     */
    public function getInvoiceData()
    {
        return $this->container['invoiceData'];
    }

    /**
     * Sets invoiceData
     * @param string $invoiceData 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
     * @return $this
     */
    public function setInvoiceData($invoiceData)
    {
        $this->container['invoiceData'] = $invoiceData;

        return $this;
    }

    /**
     * Gets monthlyInterestRate
     * @return string
     */
    public function getMonthlyInterestRate()
    {
        return $this->container['monthlyInterestRate'];
    }

    /**
     * Sets monthlyInterestRate
     * @param string $monthlyInterestRate 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
     * @return $this
     */
    public function setMonthlyInterestRate($monthlyInterestRate)
    {
        $this->container['monthlyInterestRate'] = $monthlyInterestRate;

        return $this;
    }

    /**
     * Gets planType
     * @return string
     */
    public function getPlanType()
    {
        return $this->container['planType'];
    }

    /**
     * Sets planType
     * @param string $planType #### 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)
     * @return $this
     */
    public function setPlanType($planType)
    {
        $this->container['planType'] = $planType;

        return $this;
    }

    /**
     * Gets sequence
     * @return int
     */
    public function getSequence()
    {
        return $this->container['sequence'];
    }

    /**
     * Sets sequence
     * @param int $sequence 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.
     * @return $this
     */
    public function setSequence($sequence)
    {
        $this->container['sequence'] = $sequence;

        return $this;
    }

    /**
     * Gets taxes
     * @return string
     */
    public function getTaxes()
    {
        return $this->container['taxes'];
    }

    /**
     * Sets taxes
     * @param string $taxes 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
     * @return $this
     */
    public function setTaxes($taxes)
    {
        $this->container['taxes'] = $taxes;

        return $this;
    }

    /**
     * Gets taxesPercentage
     * @return string
     */
    public function getTaxesPercentage()
    {
        return $this->container['taxesPercentage'];
    }

    /**
     * Sets taxesPercentage
     * @param string $taxesPercentage 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
     * @return $this
     */
    public function setTaxesPercentage($taxesPercentage)
    {
        $this->container['taxesPercentage'] = $taxesPercentage;

        return $this;
    }

    /**
     * Gets totalAmount
     * @return string
     */
    public function getTotalAmount()
    {
        return $this->container['totalAmount'];
    }

    /**
     * Sets totalAmount
     * @param string $totalAmount Total amount of the loan that is being paid in installments. This field is supported only for CyberSource through VisaNet.
     * @return $this
     */
    public function setTotalAmount($totalAmount)
    {
        $this->container['totalAmount'] = $totalAmount;

        return $this;
    }

    /**
     * Gets totalCount
     * @return int
     */
    public function getTotalCount()
    {
        return $this->container['totalCount'];
    }

    /**
     * Sets totalCount
     * @param int $totalCount 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.
     * @return $this
     */
    public function setTotalCount($totalCount)
    {
        $this->container['totalCount'] = $totalCount;

        return $this;
    }

    /**
     * Gets minimumTotalCount
     * @return string
     */
    public function getMinimumTotalCount()
    {
        return $this->container['minimumTotalCount'];
    }

    /**
     * Sets minimumTotalCount
     * @param string $minimumTotalCount \"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
     * @return $this
     */
    public function setMinimumTotalCount($minimumTotalCount)
    {
        $this->container['minimumTotalCount'] = $minimumTotalCount;

        return $this;
    }

    /**
     * Gets maximumTotalCount
     * @return string
     */
    public function getMaximumTotalCount()
    {
        return $this->container['maximumTotalCount'];
    }

    /**
     * Sets maximumTotalCount
     * @param string $maximumTotalCount 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
     * @return $this
     */
    public function setMaximumTotalCount($maximumTotalCount)
    {
        $this->container['maximumTotalCount'] = $maximumTotalCount;

        return $this;
    }

    /**
     * Gets firstInstallmentAmount
     * @return string
     */
    public function getFirstInstallmentAmount()
    {
        return $this->container['firstInstallmentAmount'];
    }

    /**
     * Sets firstInstallmentAmount
     * @param string $firstInstallmentAmount 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
     * @return $this
     */
    public function setFirstInstallmentAmount($firstInstallmentAmount)
    {
        $this->container['firstInstallmentAmount'] = $firstInstallmentAmount;

        return $this;
    }

    /**
     * Gets firstInstallmentDate
     * @return string
     */
    public function getFirstInstallmentDate()
    {
        return $this->container['firstInstallmentDate'];
    }

    /**
     * Sets firstInstallmentDate
     * @param string $firstInstallmentDate 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
     * @return $this
     */
    public function setFirstInstallmentDate($firstInstallmentDate)
    {
        $this->container['firstInstallmentDate'] = $firstInstallmentDate;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     * @param  integer $offset Offset
     * @return boolean
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     * @param  integer $offset Offset
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }

    /**
     * Sets value based on offset.
     * @param  integer $offset Offset
     * @param  mixed   $value  Value to be set
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     * @param  integer $offset Offset
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(\CyberSource\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
        }

        return json_encode(\CyberSource\ObjectSerializer::sanitizeForSerialization($this));
    }
}


