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 that are issued to cardholders.
Defined Under Namespace
Classes: LatestFraudWarning, LifecycleControls, Redaction, Shipping, SpendingControls, TestHelpers, 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
Cardholderobject represents an individual or business entity who is issued cards. -
#created ⇒ Object
readonly
Time at which the object was created.
-
#currency ⇒ Object
readonly
Three-letter ISO currency code, 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.
-
#latest_fraud_warning ⇒ Object
readonly
Stripe’s assessment of whether this card’s details have been compromised.
-
#lifecycle_controls ⇒ Object
readonly
Rules that control the lifecycle of this card, such as automatic cancellation.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#metadata ⇒ Object
readonly
Set of key-value pairs 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.
-
#redaction ⇒ Object
readonly
Redaction status of 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.
-
#second_line ⇒ Object
readonly
Text separate from cardholder name, printed on the card.
-
#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.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Card objects.
- .object_name ⇒ Object
-
.update(card, 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
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #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.
276 277 278 |
# File 'lib/stripe/resources/issuing/card.rb', line 276 def brand @brand end |
#cancellation_reason ⇒ Object (readonly)
The reason why the card was canceled.
278 279 280 |
# File 'lib/stripe/resources/issuing/card.rb', line 278 def cancellation_reason @cancellation_reason end |
#cardholder ⇒ Object (readonly)
An Issuing Cardholder object represents an individual or business entity who is issued cards.
Related guide: How to create a cardholder
282 283 284 |
# File 'lib/stripe/resources/issuing/card.rb', line 282 def cardholder @cardholder end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
284 285 286 |
# File 'lib/stripe/resources/issuing/card.rb', line 284 def created @created end |
#currency ⇒ Object (readonly)
Three-letter ISO currency code, in lowercase. Supported currencies are usd in the US, eur in the EU, and gbp in the UK.
286 287 288 |
# File 'lib/stripe/resources/issuing/card.rb', line 286 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. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
288 289 290 |
# File 'lib/stripe/resources/issuing/card.rb', line 288 def cvc @cvc end |
#exp_month ⇒ Object (readonly)
The expiration month of the card.
290 291 292 |
# File 'lib/stripe/resources/issuing/card.rb', line 290 def exp_month @exp_month end |
#exp_year ⇒ Object (readonly)
The expiration year of the card.
292 293 294 |
# File 'lib/stripe/resources/issuing/card.rb', line 292 def exp_year @exp_year end |
#financial_account ⇒ Object (readonly)
The financial account this card is attached to.
294 295 296 |
# File 'lib/stripe/resources/issuing/card.rb', line 294 def financial_account @financial_account end |
#id ⇒ Object (readonly)
Unique identifier for the object.
296 297 298 |
# File 'lib/stripe/resources/issuing/card.rb', line 296 def id @id end |
#last4 ⇒ Object (readonly)
The last 4 digits of the card number.
298 299 300 |
# File 'lib/stripe/resources/issuing/card.rb', line 298 def last4 @last4 end |
#latest_fraud_warning ⇒ Object (readonly)
Stripe’s assessment of whether this card’s details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk.
300 301 302 |
# File 'lib/stripe/resources/issuing/card.rb', line 300 def latest_fraud_warning @latest_fraud_warning end |
#lifecycle_controls ⇒ Object (readonly)
Rules that control the lifecycle of this card, such as automatic cancellation. Refer to our documentation for more details.
302 303 304 |
# File 'lib/stripe/resources/issuing/card.rb', line 302 def lifecycle_controls @lifecycle_controls end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
304 305 306 |
# File 'lib/stripe/resources/issuing/card.rb', line 304 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
306 307 308 |
# File 'lib/stripe/resources/issuing/card.rb', line 306 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. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.
308 309 310 |
# File 'lib/stripe/resources/issuing/card.rb', line 308 def number @number end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
310 311 312 |
# File 'lib/stripe/resources/issuing/card.rb', line 310 def object @object end |
#personalization_design ⇒ Object (readonly)
The personalization design object belonging to this card.
312 313 314 |
# File 'lib/stripe/resources/issuing/card.rb', line 312 def personalization_design @personalization_design end |
#redaction ⇒ Object (readonly)
Redaction status of this card. If not null, this card is associated to a redaction job.
314 315 316 |
# File 'lib/stripe/resources/issuing/card.rb', line 314 def redaction @redaction end |
#replaced_by ⇒ Object (readonly)
The latest card that replaces this card, if any.
316 317 318 |
# File 'lib/stripe/resources/issuing/card.rb', line 316 def replaced_by @replaced_by end |
#replacement_for ⇒ Object (readonly)
The card this card replaces, if any.
318 319 320 |
# File 'lib/stripe/resources/issuing/card.rb', line 318 def replacement_for @replacement_for end |
#replacement_reason ⇒ Object (readonly)
The reason why the previous card needed to be replaced.
320 321 322 |
# File 'lib/stripe/resources/issuing/card.rb', line 320 def replacement_reason @replacement_reason end |
#second_line ⇒ Object (readonly)
Text separate from cardholder name, printed on the card.
322 323 324 |
# File 'lib/stripe/resources/issuing/card.rb', line 322 def second_line @second_line end |
#shipping ⇒ Object (readonly)
Where and how the card will be shipped.
324 325 326 |
# File 'lib/stripe/resources/issuing/card.rb', line 324 def shipping @shipping end |
#spending_controls ⇒ Object (readonly)
Attribute for field spending_controls
326 327 328 |
# File 'lib/stripe/resources/issuing/card.rb', line 326 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.
328 329 330 |
# File 'lib/stripe/resources/issuing/card.rb', line 328 def status @status end |
#type ⇒ Object (readonly)
The type of the card.
330 331 332 |
# File 'lib/stripe/resources/issuing/card.rb', line 330 def type @type end |
#wallets ⇒ Object (readonly)
Information relating to digital wallets (like Apple Pay and Google Pay).
332 333 334 |
# File 'lib/stripe/resources/issuing/card.rb', line 332 def wallets @wallets end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Creates an Issuing Card object.
335 336 337 |
# File 'lib/stripe/resources/issuing/card.rb', line 335 def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/issuing/cards", params: params, opts: opts) end |
.field_remappings ⇒ Object
476 477 478 |
# File 'lib/stripe/resources/issuing/card.rb', line 476 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
465 466 467 468 469 470 471 472 473 474 |
# File 'lib/stripe/resources/issuing/card.rb', line 465 def self.inner_class_types @inner_class_types = { latest_fraud_warning: LatestFraudWarning, lifecycle_controls: LifecycleControls, redaction: Redaction, shipping: Shipping, spending_controls: SpendingControls, wallets: Wallets, } 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.
340 341 342 |
# File 'lib/stripe/resources/issuing/card.rb', line 340 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(card, 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.
345 346 347 348 349 350 351 352 |
# File 'lib/stripe/resources/issuing/card.rb', line 345 def self.update(card, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/cards/%<card>s", { card: CGI.escape(card) }), params: params, opts: opts ) end |
Instance Method Details
#test_helpers ⇒ Object
354 355 356 |
# File 'lib/stripe/resources/issuing/card.rb', line 354 def test_helpers TestHelpers.new(self) end |