Class: Stripe::Issuing::Card
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Issuing::Card
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/issuing/card.rb
Overview
You can [create physical or virtual cards](stripe.com/docs/issuing) that are issued to cardholders.
Defined Under Namespace
Classes: CreateParams, DeliverCardParams, FailCardParams, ListParams, RetrieveParams, ReturnCardParams, ShipCardParams, Shipping, SpendingControls, SubmitCardParams, TestHelpers, UpdateParams, Wallets
Constant Summary collapse
- OBJECT_NAME =
"issuing.card"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#brand ⇒ Object
readonly
The brand of the card.
-
#cancellation_reason ⇒ Object
readonly
The reason why the card was canceled.
-
#cardholder ⇒ Object
readonly
An Issuing ‘Cardholder` object represents an individual or business entity who is [issued](stripe.com/docs/issuing) cards.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#currency ⇒ Object
readonly
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase.
-
#cvc ⇒ Object
readonly
The card’s CVC.
-
#exp_month ⇒ Object
readonly
The expiration month of the card.
-
#exp_year ⇒ Object
readonly
The expiration year of the card.
-
#financial_account ⇒ Object
readonly
The financial account this card is attached to.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#last4 ⇒ Object
readonly
The last 4 digits of the card number.
-
#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.
-
#number ⇒ Object
readonly
The full unredacted card number.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#personalization_design ⇒ Object
readonly
The personalization design object belonging to this card.
-
#replaced_by ⇒ Object
readonly
The latest card that replaces this card, if any.
-
#replacement_for ⇒ Object
readonly
The card this card replaces, if any.
-
#replacement_reason ⇒ Object
readonly
The reason why the previous card needed to be replaced.
-
#shipping ⇒ Object
readonly
Where and how the card will be shipped.
-
#spending_controls ⇒ Object
readonly
Attribute for field spending_controls.
-
#status ⇒ Object
readonly
Whether authorizations can be approved on this card.
-
#type ⇒ Object
readonly
The type of the card.
-
#wallets ⇒ Object
readonly
Information relating to digital wallets (like Apple Pay and Google Pay).
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Creates an Issuing Card object.
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Card objects.
- .object_name ⇒ Object
-
.update(id, params = {}, opts = {}) ⇒ Object
Updates the specified Issuing Card object by setting the values of the parameters passed.
Instance Method Summary collapse
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
#==, #[], #[]=, 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
#brand ⇒ Object (readonly)
The brand of the card.
738 739 740 |
# File 'lib/stripe/resources/issuing/card.rb', line 738 def brand @brand end |
#cancellation_reason ⇒ Object (readonly)
The reason why the card was canceled.
741 742 743 |
# File 'lib/stripe/resources/issuing/card.rb', line 741 def cancellation_reason @cancellation_reason end |
#cardholder ⇒ Object (readonly)
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)
746 747 748 |
# File 'lib/stripe/resources/issuing/card.rb', line 746 def cardholder @cardholder end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
749 750 751 |
# File 'lib/stripe/resources/issuing/card.rb', line 749 def created @created end |
#currency ⇒ Object (readonly)
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are ‘usd` in the US, `eur` in the EU, and `gbp` in the UK.
752 753 754 |
# File 'lib/stripe/resources/issuing/card.rb', line 752 def currency @currency end |
#cvc ⇒ Object (readonly)
The card’s CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the ‘expand` parameter](stripe.com/docs/api/expanding_objects). Additionally, it’s only available via the [“Retrieve a card” endpoint](stripe.com/docs/api/issuing/cards/retrieve), not via “List all cards” or any other endpoint.
755 756 757 |
# File 'lib/stripe/resources/issuing/card.rb', line 755 def cvc @cvc end |
#exp_month ⇒ Object (readonly)
The expiration month of the card.
758 759 760 |
# File 'lib/stripe/resources/issuing/card.rb', line 758 def exp_month @exp_month end |
#exp_year ⇒ Object (readonly)
The expiration year of the card.
761 762 763 |
# File 'lib/stripe/resources/issuing/card.rb', line 761 def exp_year @exp_year end |
#financial_account ⇒ Object (readonly)
The financial account this card is attached to.
764 765 766 |
# File 'lib/stripe/resources/issuing/card.rb', line 764 def financial_account @financial_account end |
#id ⇒ Object (readonly)
Unique identifier for the object.
767 768 769 |
# File 'lib/stripe/resources/issuing/card.rb', line 767 def id @id end |
#last4 ⇒ Object (readonly)
The last 4 digits of the card number.
770 771 772 |
# File 'lib/stripe/resources/issuing/card.rb', line 770 def last4 @last4 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.
773 774 775 |
# File 'lib/stripe/resources/issuing/card.rb', line 773 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.
776 777 778 |
# File 'lib/stripe/resources/issuing/card.rb', line 776 def @metadata end |
#number ⇒ Object (readonly)
The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the ‘expand` parameter](stripe.com/docs/api/expanding_objects). Additionally, it’s only available via the [“Retrieve a card” endpoint](stripe.com/docs/api/issuing/cards/retrieve), not via “List all cards” or any other endpoint.
779 780 781 |
# File 'lib/stripe/resources/issuing/card.rb', line 779 def number @number end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
782 783 784 |
# File 'lib/stripe/resources/issuing/card.rb', line 782 def object @object end |
#personalization_design ⇒ Object (readonly)
The personalization design object belonging to this card.
785 786 787 |
# File 'lib/stripe/resources/issuing/card.rb', line 785 def personalization_design @personalization_design end |
#replaced_by ⇒ Object (readonly)
The latest card that replaces this card, if any.
788 789 790 |
# File 'lib/stripe/resources/issuing/card.rb', line 788 def replaced_by @replaced_by end |
#replacement_for ⇒ Object (readonly)
The card this card replaces, if any.
791 792 793 |
# File 'lib/stripe/resources/issuing/card.rb', line 791 def replacement_for @replacement_for end |
#replacement_reason ⇒ Object (readonly)
The reason why the previous card needed to be replaced.
794 795 796 |
# File 'lib/stripe/resources/issuing/card.rb', line 794 def replacement_reason @replacement_reason end |
#shipping ⇒ Object (readonly)
Where and how the card will be shipped.
797 798 799 |
# File 'lib/stripe/resources/issuing/card.rb', line 797 def shipping @shipping end |
#spending_controls ⇒ Object (readonly)
Attribute for field spending_controls
800 801 802 |
# File 'lib/stripe/resources/issuing/card.rb', line 800 def spending_controls @spending_controls end |
#status ⇒ Object (readonly)
Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to ‘inactive`.
803 804 805 |
# File 'lib/stripe/resources/issuing/card.rb', line 803 def status @status end |
#type ⇒ Object (readonly)
The type of the card.
806 807 808 |
# File 'lib/stripe/resources/issuing/card.rb', line 806 def type @type end |
#wallets ⇒ Object (readonly)
Information relating to digital wallets (like Apple Pay and Google Pay).
809 810 811 |
# File 'lib/stripe/resources/issuing/card.rb', line 809 def wallets @wallets end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Creates an Issuing Card object.
812 813 814 |
# File 'lib/stripe/resources/issuing/card.rb', line 812 def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/issuing/cards", params: params, opts: opts) end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
817 818 819 |
# File 'lib/stripe/resources/issuing/card.rb', line 817 def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/issuing/cards", params: params, opts: opts) end |
.object_name ⇒ Object
13 14 15 |
# File 'lib/stripe/resources/issuing/card.rb', line 13 def self.object_name "issuing.card" end |
.update(id, params = {}, opts = {}) ⇒ Object
Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
822 823 824 825 826 827 828 829 |
# File 'lib/stripe/resources/issuing/card.rb', line 822 def self.update(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/cards/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts ) end |
Instance Method Details
#test_helpers ⇒ Object
831 832 833 |
# File 'lib/stripe/resources/issuing/card.rb', line 831 def test_helpers TestHelpers.new(self) end |