Class: Stripe::Issuing::Cardholder
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Issuing::Cardholder
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/issuing/cardholder.rb
Overview
An Issuing ‘Cardholder` object represents an individual or business entity who is [issued](stripe.com/docs/issuing) cards.
Related guide: [How to create a cardholder](stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder)
Defined Under Namespace
Classes: Billing, Company, CreateParams, Individual, ListParams, Requirements, SpendingControls, UpdateParams
Constant Summary collapse
- OBJECT_NAME =
"issuing.cardholder"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#billing ⇒ Object
readonly
Attribute for field billing.
-
#company ⇒ Object
readonly
Additional information about a ‘company` cardholder.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#email ⇒ Object
readonly
The cardholder’s email address.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#individual ⇒ Object
readonly
Additional information about an ‘individual` cardholder.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#name ⇒ Object
readonly
The cardholder’s name.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#phone_number ⇒ Object
readonly
The cardholder’s phone number.
-
#preferred_locales ⇒ Object
readonly
The cardholder’s preferred locales (languages), ordered by preference.
-
#requirements ⇒ Object
readonly
Attribute for field requirements.
-
#spending_controls ⇒ Object
readonly
Rules that control spending across this cardholder’s cards.
-
#status ⇒ Object
readonly
Specifies whether to permit authorizations on this cardholder’s cards.
-
#type ⇒ Object
readonly
One of ‘individual` or `company`.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Creates a new Issuing Cardholder object that can be issued cards.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Cardholder objects.
- .object_name ⇒ Object
-
.update(cardholder, params = {}, opts = {}) ⇒ Object
Updates the specified Issuing Cardholder object by setting the values of the parameters passed.
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Save
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#billing ⇒ Object (readonly)
Attribute for field billing
731 732 733 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 731 def billing @billing end |
#company ⇒ Object (readonly)
Additional information about a ‘company` cardholder.
733 734 735 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 733 def company @company end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
735 736 737 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 735 def created @created end |
#email ⇒ Object (readonly)
The cardholder’s email address.
737 738 739 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 737 def email @email end |
#id ⇒ Object (readonly)
Unique identifier for the object.
739 740 741 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 739 def id @id end |
#individual ⇒ Object (readonly)
Additional information about an ‘individual` cardholder.
741 742 743 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 741 def individual @individual end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
743 744 745 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 743 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
745 746 747 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 745 def @metadata end |
#name ⇒ Object (readonly)
The cardholder’s name. This will be printed on cards issued to them.
747 748 749 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 747 def name @name end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
749 750 751 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 749 def object @object end |
#phone_number ⇒ Object (readonly)
The cardholder’s phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
751 752 753 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 751 def phone_number @phone_number end |
#preferred_locales ⇒ Object (readonly)
The cardholder’s preferred locales (languages), ordered by preference. Locales can be ‘de`, `en`, `es`, `fr`, or `it`.
This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
754 755 756 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 754 def preferred_locales @preferred_locales end |
#requirements ⇒ Object (readonly)
Attribute for field requirements
756 757 758 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 756 def requirements @requirements end |
#spending_controls ⇒ Object (readonly)
Rules that control spending across this cardholder’s cards. Refer to our [documentation](stripe.com/docs/issuing/controls/spending-controls) for more details.
758 759 760 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 758 def spending_controls @spending_controls end |
#status ⇒ Object (readonly)
Specifies whether to permit authorizations on this cardholder’s cards.
760 761 762 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 760 def status @status end |
#type ⇒ Object (readonly)
One of ‘individual` or `company`. See [Choose a cardholder type](stripe.com/docs/issuing/other/choose-cardholder) for more details.
762 763 764 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 762 def type @type end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Creates a new Issuing Cardholder object that can be issued cards.
765 766 767 768 769 770 771 772 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 765 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/issuing/cardholders", params: params, opts: opts ) end |
.field_remappings ⇒ Object
804 805 806 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 804 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
794 795 796 797 798 799 800 801 802 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 794 def self.inner_class_types @inner_class_types = { billing: Billing, company: Company, individual: Individual, requirements: Requirements, spending_controls: SpendingControls, } end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
775 776 777 778 779 780 781 782 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 775 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/cardholders", params: params, opts: opts ) end |
.object_name ⇒ Object
15 16 17 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 15 def self.object_name "issuing.cardholder" end |
.update(cardholder, params = {}, opts = {}) ⇒ Object
Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
785 786 787 788 789 790 791 792 |
# File 'lib/stripe/resources/issuing/cardholder.rb', line 785 def self.update(cardholder, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/cardholders/%<cardholder>s", { cardholder: CGI.escape(cardholder) }), params: params, opts: opts ) end |