/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* 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 PaymentCardSpec model module.
* @module models/PaymentCardSpec
* @version 20.4
*/
export default class PaymentCardSpec {
/**
* Constructs a new <code>PaymentCardSpec</code>.
* Document representing the specification for a payment card.
* @alias module:models/PaymentCardSpec
* @class
*/
constructor() {
}
/**
* Constructs a <code>PaymentCardSpec</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/PaymentCardSpec} obj Optional instance to populate.
* @return {module:models/PaymentCardSpec} The populated <code>PaymentCardSpec</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new PaymentCardSpec()
if (data.hasOwnProperty('card_type')) {
obj.card_type = ApiClient.convertToType(data.card_type, 'String')
}
if (data.hasOwnProperty('checksum_verification_enabled')) {
obj.checksum_verification_enabled = ApiClient.convertToType(data.checksum_verification_enabled, 'Boolean')
}
if (data.hasOwnProperty('description')) {
obj.description = ApiClient.convertToType(data.description, 'String')
}
if (data.hasOwnProperty('image')) {
obj.image = ApiClient.convertToType(data.image, 'String')
}
if (data.hasOwnProperty('name')) {
obj.name = ApiClient.convertToType(data.name, 'String')
}
if (data.hasOwnProperty('number_lengths')) {
obj.number_lengths = ApiClient.convertToType(data.number_lengths, ['String'])
}
if (data.hasOwnProperty('number_prefixes')) {
obj.number_prefixes = ApiClient.convertToType(data.number_prefixes, ['String'])
}
if (data.hasOwnProperty('security_code_length')) {
obj.security_code_length = ApiClient.convertToType(data.security_code_length, 'Number')
}
}
return obj
}
/**
* The type of the payment card.
* @member {String} card_type
*/
card_type = undefined;
/**
* A flag indicating whether the card number is verified using the Luhn checksum algorithm.
* @member {Boolean} checksum_verification_enabled
*/
checksum_verification_enabled = undefined;
/**
* The localized description of the payment card.
* @member {String} description
*/
description = undefined;
/**
* The URL to the image that represents the payment card.
* @member {String} image
*/
image = undefined;
/**
* The localized name of the payment card.
* @member {String} name
*/
name = undefined;
/**
* The sorted list of number lengths (individual lengths as well as length ranges).
* @member {Array.<String>} number_lengths
*/
number_lengths = undefined;
/**
* The sorted list of number prefixes (individual prefixes as well as prefix ranges).
* @member {Array.<String>} number_prefixes
*/
number_prefixes = undefined;
/**
* The length of the security code for this card.
* @member {Number} security_code_length
*/
security_code_length = undefined;
}