All files / src/types payment-details.js

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30                                      6x                    
/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
/* Copyright (c) 2018 Mobify Research & Development Inc. All rights reserved. */
/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
 
import PropTypes from 'prop-types'
import {PositiveInteger} from './positive-integer'
 
/**
 * @memberOf module:types
 * @typedef {Object} PaymentDetails Details of the payment method (i.e details of a Credit Card, Paypal, GiftCard etc)
 * @property {String} type The type of this payment method (i.e. Visa, Mastercard).
 * @property {String} holderName The name of the account holder.
 * @property {String} number The card/account number or code (i.e. credit card number, gift card code)
 * @property {String} maskedNumber The card/account number or code masked.
 * @property {String} username The card/account username (i.e. Paypal username)
 * @property {module:types.PositiveInteger} expiryMonth The month the card/account expires in number form.
 * @property {module:types.PositiveInteger} expiryYear The year the card/account expires.
 * @property {String} ccv The credit card ccv number (card security code)
 */
export const PaymentDetails = {
    type: PropTypes.string,
    holderName: PropTypes.string,
    number: PositiveInteger,
    maskedNumber: PropTypes.string,
    username: PropTypes.string,
    expiryMonth: PositiveInteger,
    expiryYear: PositiveInteger,
    ccv: PropTypes.string
}