Source: models/PaymentCard.js

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
/* Copyright (c) 2020 Mobify Research & Development Inc. All rights reserved. */
/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */

/**
 * Shop API
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 20.4
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 */


import ApiClient from '../ApiClient'





/**
* The PaymentCard model module.
* @module models/PaymentCard
* @version 20.4
*/
export default class PaymentCard {
    /**
    * Constructs a new <code>PaymentCard</code>.
    * Document representing a payment card.
    * @alias module:models/PaymentCard
    * @class
    */

    constructor() {








    }

    /**
    * Constructs a <code>PaymentCard</code> from a plain JavaScript object, optionally creating a new instance.
    * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
    * @param {Object} data The plain JavaScript object bearing properties of interest.
    * @param {module:models/PaymentCard} obj Optional instance to populate.
    * @return {module:models/PaymentCard} The populated <code>PaymentCard</code> instance.
    */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new PaymentCard()





            if (data.hasOwnProperty('card_type')) {
                obj.card_type = ApiClient.convertToType(data.card_type, 'String')
            }
            if (data.hasOwnProperty('credit_card_expired')) {
                obj.credit_card_expired = ApiClient.convertToType(data.credit_card_expired, 'Boolean')
            }
            if (data.hasOwnProperty('credit_card_token')) {
                obj.credit_card_token = ApiClient.convertToType(data.credit_card_token, 'String')
            }
            if (data.hasOwnProperty('expiration_month')) {
                obj.expiration_month = ApiClient.convertToType(data.expiration_month, 'Number')
            }
            if (data.hasOwnProperty('expiration_year')) {
                obj.expiration_year = ApiClient.convertToType(data.expiration_year, 'Number')
            }
            if (data.hasOwnProperty('holder')) {
                obj.holder = ApiClient.convertToType(data.holder, 'String')
            }
            if (data.hasOwnProperty('issue_number')) {
                obj.issue_number = ApiClient.convertToType(data.issue_number, 'String')
            }
            if (data.hasOwnProperty('masked_number')) {
                obj.masked_number = ApiClient.convertToType(data.masked_number, 'String')
            }
            if (data.hasOwnProperty('number_last_digits')) {
                obj.number_last_digits = ApiClient.convertToType(data.number_last_digits, 'String')
            }
            if (data.hasOwnProperty('valid_from_month')) {
                obj.valid_from_month = ApiClient.convertToType(data.valid_from_month, 'Number')
            }
            if (data.hasOwnProperty('valid_from_year')) {
                obj.valid_from_year = ApiClient.convertToType(data.valid_from_year, 'Number')
            }
        }
        return obj
    }

    /**
    * The payment card type (for example, 'Visa').
    * @member {String} card_type
    */
    card_type = undefined;
    /**
    * A flag indicating if the credit card is expired.
    * @member {Boolean} credit_card_expired
    */
    credit_card_expired = undefined;
    /**
    * A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data at the  token store.
    * @member {String} credit_card_token
    */
    credit_card_token = undefined;
    /**
    * The month when the payment card expires.
    * @member {Number} expiration_month
    */
    expiration_month = undefined;
    /**
    * The year when the payment card expires.
    * @member {Number} expiration_year
    */
    expiration_year = undefined;
    /**
    * The payment card holder.
    * @member {String} holder
    */
    holder = undefined;
    /**
    * The payment card issue number.
    * @member {String} issue_number
    */
    issue_number = undefined;
    /**
    * The masked credit card number.
    * @member {String} masked_number
    */
    masked_number = undefined;
    /**
    * The last digits of credit card number.
    * @member {String} number_last_digits
    */
    number_last_digits = undefined;
    /**
    * The payment card valid from month.
    * @member {Number} valid_from_month
    */
    valid_from_month = undefined;
    /**
    * The payment card valid from year.
    * @member {Number} valid_from_year
    */
    valid_from_year = undefined;








}