class Stripe::Card

Overview

You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later. Related guide: Card payments with Sources

Included Modules

Defined in:

stripe/models/card.cr

Constant Summary

ERROR_MESSAGE_FOR_AVAILABLE_PAYOUT_METHODS = "invalid value for \"available_payout_methods\", must be one of [instant, standard]."
ERROR_MESSAGE_FOR_OBJECT = "invalid value for \"object\", must be one of [card]."
MAX_LENGTH_FOR_ADDRESS_CITY = 5000
MAX_LENGTH_FOR_ADDRESS_COUNTRY = 5000
MAX_LENGTH_FOR_ADDRESS_LINE1 = 5000
MAX_LENGTH_FOR_ADDRESS_LINE1_CHECK = 5000
MAX_LENGTH_FOR_ADDRESS_LINE2 = 5000
MAX_LENGTH_FOR_ADDRESS_STATE = 5000
MAX_LENGTH_FOR_ADDRESS_ZIP = 5000
MAX_LENGTH_FOR_ADDRESS_ZIP_CHECK = 5000
MAX_LENGTH_FOR_BRAND = 5000
MAX_LENGTH_FOR_COUNTRY = 5000
MAX_LENGTH_FOR_CVC_CHECK = 5000
MAX_LENGTH_FOR_DESCRIPTION = 5000
MAX_LENGTH_FOR_DYNAMIC_LAST4 = 5000
MAX_LENGTH_FOR_FINGERPRINT = 5000
MAX_LENGTH_FOR_FUNDING = 5000
MAX_LENGTH_FOR_ID = 5000
MAX_LENGTH_FOR_IIN = 5000
MAX_LENGTH_FOR_ISSUER = 5000
MAX_LENGTH_FOR_LAST4 = 5000
MAX_LENGTH_FOR_NAME = 5000
MAX_LENGTH_FOR_STATUS = 5000
MAX_LENGTH_FOR_TOKENIZATION_METHOD = 5000
VALID_VALUES_FOR_AVAILABLE_PAYOUT_METHODS = String.static_array("instant", "standard")
VALID_VALUES_FOR_OBJECT = String.static_array("card")

Constructors

Instance Method Summary

Instance methods inherited from module OpenApi::Json

after_initialize after_initialize, clone clone, eql?(o : self) eql?, to_hash : Hash(String, JSON::Any) to_hash, to_json_any : JSON::Any to_json_any

Class methods inherited from module OpenApi::Json

build_from_hash(hash : Hash) build_from_hash, build_from_json_any(json_any : JSON::Any) build_from_json_any

Instance methods inherited from module OpenApi::Validatable

list_invalid_properties : Array(String) list_invalid_properties, list_invalid_properties_for(key : String) : Array(String) list_invalid_properties_for, valid? : Bool valid?, validate : Nil validate

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, address_city : String | Nil = nil, address_country : String | Nil = nil, address_line1 : String | Nil = nil, address_line1_check : String | Nil = nil, address_line2 : String | Nil = nil, address_state : String | Nil = nil, address_zip : String | Nil = nil, address_zip_check : String | Nil = nil, brand : String | Nil = nil, country : String | Nil = nil, cvc_check : String | Nil = nil, dynamic_last4 : String | Nil = nil, exp_month : Int64 | Nil = nil, exp_year : Int64 | Nil = nil, funding : String | Nil = nil, id : String | Nil = nil, last4 : String | Nil = nil, metadata : Hash(String, String) | Nil = nil, name : String | Nil = nil, object : String | Nil = nil, tokenization_method : String | Nil = nil, account : Stripe::CardAccount | Nil = nil, available_payout_methods : Array(String) | Nil = nil, currency : String | Nil = nil, customer : Stripe::CardCustomer | Nil = nil, default_for_currency : Bool | Nil = nil, description : String | Nil = nil, fingerprint : String | Nil = nil, iin : String | Nil = nil, issuer : String | Nil = nil, networks : Stripe::TokenCardNetworks | Nil = nil, status : String | Nil = nil) #

Initializes the object @param [Hash] attributes Model attributes in the form of hash


[View source]

Instance Method Detail

def ==(other : self) #

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code


def account : Stripe::CardAccount | Nil #

[View source]
def account=(new_value : Stripe::CardAccount | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] account Object to be assigned


[View source]
def account_present=(account_present : Bool) #

[View source]
def account_present? : Bool #

[View source]
def address_city : String | Nil #

[View source]
def address_city=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] address_city Object to be assigned


[View source]
def address_country : String | Nil #

[View source]
def address_country=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] address_country Object to be assigned


[View source]
def address_line1 : String | Nil #

[View source]
def address_line1=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] address_line1 Object to be assigned


[View source]
def address_line1_check : String | Nil #

[View source]
def address_line1_check=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] address_line1_check Object to be assigned


[View source]
def address_line2 : String | Nil #

[View source]
def address_line2=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] address_line2 Object to be assigned


[View source]
def address_state : String | Nil #

[View source]
def address_state=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] address_state Object to be assigned


[View source]
def address_zip : String | Nil #

[View source]
def address_zip=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] address_zip Object to be assigned


[View source]
def address_zip_check : String | Nil #

[View source]
def address_zip_check=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] address_zip_check Object to be assigned


[View source]
def available_payout_methods : Array(String) | Nil #

[View source]
def available_payout_methods=(new_value : Array(String) | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] available_payout_methods Object to be assigned


[View source]
def available_payout_methods_present=(available_payout_methods_present : Bool) #

[View source]
def available_payout_methods_present? : Bool #

[View source]
def brand : String | Nil #

[View source]
def brand=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] brand Object to be assigned


[View source]
def country : String | Nil #

[View source]
def country=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] country Object to be assigned


[View source]
def currency : String | Nil #

[View source]
def currency=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] currency Object to be assigned


[View source]
def currency_present=(currency_present : Bool) #

[View source]
def currency_present? : Bool #

[View source]
def customer : Stripe::CardCustomer | Nil #

[View source]
def customer=(new_value : Stripe::CardCustomer | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] customer Object to be assigned


[View source]
def customer_present=(customer_present : Bool) #

[View source]
def customer_present? : Bool #

[View source]
def cvc_check : String | Nil #

[View source]
def cvc_check=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] cvc_check Object to be assigned


[View source]
def default_for_currency : Bool | Nil #

[View source]
def default_for_currency=(new_value : Bool | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] default_for_currency Object to be assigned


[View source]
def default_for_currency_present=(default_for_currency_present : Bool) #

[View source]
def default_for_currency_present? : Bool #

[View source]
def description : String | Nil #

[View source]
def description=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] description Object to be assigned


[View source]
def dynamic_last4 : String | Nil #

[View source]
def dynamic_last4=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] dynamic_last4 Object to be assigned


[View source]
def exp_month : Int64 | Nil #

[View source]
def exp_month=(new_value : Int64 | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] exp_month Object to be assigned


[View source]
def exp_year : Int64 | Nil #

[View source]
def exp_year=(new_value : Int64 | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] exp_year Object to be assigned


[View source]
def fingerprint : String | Nil #

[View source]
def fingerprint=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] fingerprint Object to be assigned


[View source]
def fingerprint_present=(fingerprint_present : Bool) #

[View source]
def fingerprint_present? : Bool #

[View source]
def funding : String | Nil #

[View source]
def funding=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] funding Object to be assigned


[View source]
def hash(hasher) #

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code


def id : String | Nil #

[View source]
def id=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned


[View source]
def iin : String | Nil #

[View source]
def iin=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] iin Object to be assigned


[View source]
def issuer : String | Nil #

[View source]
def issuer=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] issuer Object to be assigned


[View source]
def last4 : String | Nil #

[View source]
def last4=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] last4 Object to be assigned


[View source]
def list_invalid_properties : Array(String) #

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons


[View source]
def metadata : Hash(String, String) | Nil #

[View source]
def metadata=(new_value : Hash(String, String) | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] metadata Object to be assigned


[View source]
def name : String | Nil #

[View source]
def name=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] name Object to be assigned


[View source]
def networks : Stripe::TokenCardNetworks | Nil #

[View source]
def networks=(new_value : Stripe::TokenCardNetworks | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] networks Object to be assigned


[View source]
def object : String | Nil #

[View source]
def object=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned


[View source]
def status : String | Nil #

[View source]
def status=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] status Object to be assigned


[View source]
def status_present=(status_present : Bool) #

[View source]
def status_present? : Bool #

[View source]
def tokenization_method : String | Nil #

[View source]
def tokenization_method=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] tokenization_method Object to be assigned


[View source]
def valid? : Bool #

Check to see if the all the properties in the model are valid @return true if the model is valid


[View source]