class Stripe::Customer
- Stripe::Customer
- Reference
- Object
Overview
This object represents a customer of your business. Use it to create recurring charges and track payments that belong to the same customer. Related guide: Save a card during payment
Included Modules
- JSON::Serializable
- JSON::Serializable::Unmapped
- OpenApi::Json
- OpenApi::Validatable
Defined in:
stripe/models/customer.crConstant Summary
-
ERROR_MESSAGE_FOR_OBJECT =
"invalid value for \"object\", must be one of [customer]."
-
ERROR_MESSAGE_FOR_TAX_EXEMPT =
"invalid value for \"tax_exempt\", must be one of [exempt, none, reverse]."
-
MAX_LENGTH_FOR_CURRENCY =
5000
-
MAX_LENGTH_FOR_DESCRIPTION =
5000
-
MAX_LENGTH_FOR_EMAIL =
5000
-
MAX_LENGTH_FOR_ID =
5000
-
MAX_LENGTH_FOR_INVOICE_PREFIX =
5000
-
MAX_LENGTH_FOR_NAME =
5000
-
MAX_LENGTH_FOR_PHONE =
5000
-
VALID_VALUES_FOR_OBJECT =
String.static_array("customer")
-
VALID_VALUES_FOR_TAX_EXEMPT =
String.static_array("exempt", "none", "reverse")
Constructors
- .new(pull : JSON::PullParser)
-
.new(*, created : Int64 | Nil = nil, default_source : Stripe::CustomerDefaultSource | Nil = nil, description : String | Nil = nil, email : String | Nil = nil, id : String | Nil = nil, livemode : Bool | Nil = nil, object : String | Nil = nil, shipping : Stripe::CustomerShipping1 | Nil = nil, address : Stripe::CustomerAddress | Nil = nil, balance : Int64 | Nil = nil, cash_balance : Stripe::CustomerCashBalance | Nil = nil, currency : String | Nil = nil, delinquent : Bool | Nil = nil, discount : Stripe::CustomerDiscount | Nil = nil, invoice_credit_balance : Hash(String, Int32) | Nil = nil, invoice_prefix : String | Nil = nil, invoice_settings : Stripe::InvoiceSettingCustomerSetting | Nil = nil, metadata : Hash(String, String) | Nil = nil, name : String | Nil = nil, next_invoice_sequence : Int64 | Nil = nil, phone : String | Nil = nil, preferred_locales : Array(String) | Nil = nil, sources : Stripe::ApmsSourcesSourceList | Nil = nil, subscriptions : Stripe::SubscriptionList | Nil = nil, tax : Stripe::CustomerTax | Nil = nil, tax_exempt : String | Nil = nil, tax_ids : Stripe::TaxIDsList | Nil = nil, test_clock : Stripe::CustomerTestClock | Nil = nil)
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance Method Summary
-
#==(other : self)
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes.
- #address : Stripe::CustomerAddress | Nil
-
#address=(new_value : Stripe::CustomerAddress | Nil)
Custom attribute writer method checking allowed values (enum).
- #address_present=(address_present : Bool)
- #address_present? : Bool
- #balance : Int64 | Nil
-
#balance=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #cash_balance : Stripe::CustomerCashBalance | Nil
-
#cash_balance=(new_value : Stripe::CustomerCashBalance | Nil)
Custom attribute writer method checking allowed values (enum).
- #cash_balance_present=(cash_balance_present : Bool)
- #cash_balance_present? : Bool
- #created : Int64 | Nil
-
#created=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #currency : String | Nil
-
#currency=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #currency_present=(currency_present : Bool)
- #currency_present? : Bool
- #default_source : Stripe::CustomerDefaultSource | Nil
-
#default_source=(new_value : Stripe::CustomerDefaultSource | Nil)
Custom attribute writer method checking allowed values (enum).
- #delinquent : Bool | Nil
-
#delinquent=(new_value : Bool | Nil)
Custom attribute writer method checking allowed values (enum).
- #delinquent_present=(delinquent_present : Bool)
- #delinquent_present? : Bool
- #description : String | Nil
-
#description=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #discount : Stripe::CustomerDiscount | Nil
-
#discount=(new_value : Stripe::CustomerDiscount | Nil)
Custom attribute writer method checking allowed values (enum).
- #discount_present=(discount_present : Bool)
- #discount_present? : Bool
- #email : String | Nil
-
#email=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
-
#hash(hasher)
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes.
- #id : String | Nil
-
#id=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #invoice_credit_balance : Hash(String, Int32) | Nil
-
#invoice_credit_balance=(new_value : Hash(String, Int32) | Nil)
Custom attribute writer method checking allowed values (enum).
- #invoice_prefix : String | Nil
-
#invoice_prefix=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #invoice_prefix_present=(invoice_prefix_present : Bool)
- #invoice_prefix_present? : Bool
- #invoice_settings : Stripe::InvoiceSettingCustomerSetting | Nil
-
#invoice_settings=(new_value : Stripe::InvoiceSettingCustomerSetting | Nil)
Custom attribute writer method checking allowed values (enum).
-
#list_invalid_properties : Array(String)
Show invalid properties with the reasons.
- #livemode : Bool | Nil
-
#livemode=(new_value : Bool | Nil)
Custom attribute writer method checking allowed values (enum).
- #metadata : Hash(String, String) | Nil
-
#metadata=(new_value : Hash(String, String) | Nil)
Custom attribute writer method checking allowed values (enum).
- #name : String | Nil
-
#name=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #name_present=(name_present : Bool)
- #name_present? : Bool
- #next_invoice_sequence : Int64 | Nil
-
#next_invoice_sequence=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #object : String | Nil
-
#object=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #phone : String | Nil
-
#phone=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #phone_present=(phone_present : Bool)
- #phone_present? : Bool
- #preferred_locales : Array(String) | Nil
-
#preferred_locales=(new_value : Array(String) | Nil)
Custom attribute writer method checking allowed values (enum).
- #preferred_locales_present=(preferred_locales_present : Bool)
- #preferred_locales_present? : Bool
- #shipping : Stripe::CustomerShipping1 | Nil
-
#shipping=(new_value : Stripe::CustomerShipping1 | Nil)
Custom attribute writer method checking allowed values (enum).
- #sources : Stripe::ApmsSourcesSourceList | Nil
-
#sources=(new_value : Stripe::ApmsSourcesSourceList | Nil)
Custom attribute writer method checking allowed values (enum).
- #subscriptions : Stripe::SubscriptionList | Nil
-
#subscriptions=(new_value : Stripe::SubscriptionList | Nil)
Custom attribute writer method checking allowed values (enum).
- #tax : Stripe::CustomerTax | Nil
-
#tax=(new_value : Stripe::CustomerTax | Nil)
Custom attribute writer method checking allowed values (enum).
- #tax_exempt : String | Nil
-
#tax_exempt=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #tax_exempt_present=(tax_exempt_present : Bool)
- #tax_exempt_present? : Bool
- #tax_ids : Stripe::TaxIDsList | Nil
-
#tax_ids=(new_value : Stripe::TaxIDsList | Nil)
Custom attribute writer method checking allowed values (enum).
- #test_clock : Stripe::CustomerTestClock | Nil
-
#test_clock=(new_value : Stripe::CustomerTestClock | Nil)
Custom attribute writer method checking allowed values (enum).
- #test_clock_present=(test_clock_present : Bool)
- #test_clock_present? : Bool
-
#valid? : Bool
Check to see if the all the properties in the model are valid @return true if the model is valid
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
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance Method Detail
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code
Custom attribute writer method checking allowed values (enum). @param [Object] address Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] balance Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] cash_balance Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] created Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] currency Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] default_source Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] delinquent Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] description Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] discount Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] email Object to be assigned
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code
Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] invoice_credit_balance Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] invoice_prefix Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] invoice_settings Object to be assigned
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Custom attribute writer method checking allowed values (enum). @param [Object] livemode Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] metadata Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] name Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] next_invoice_sequence Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] phone Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] preferred_locales Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] shipping Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] sources Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] subscriptions Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] tax Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] tax_exempt Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] tax_ids Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] test_clock Object to be assigned
Check to see if the all the properties in the model are valid @return true if the model is valid