Class: Stripe::Issuing::Authorization
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Issuing::Authorization
- Extended by:
- Gem::Deprecate, APIOperations::List
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/issuing/authorization.rb
Overview
When an [issued card](stripe.com/docs/issuing) is used to make a purchase, an Issuing ‘Authorization` object is created. [Authorizations](stripe.com/docs/issuing/purchases/authorizations) must be approved for the purchase to be completed successfully.
Related guide: [Issued card authorizations](stripe.com/docs/issuing/purchases/authorizations)
Defined Under Namespace
Classes: AmountDetails, ApproveParams, CaptureParams, CreateParams, DeclineParams, ExpireParams, FinalizeAmountParams, Fleet, FraudChallenge, Fuel, IncrementParams, ListParams, MerchantData, NetworkData, PendingRequest, RequestHistory, RespondParams, ReverseParams, TestHelpers, Treasury, UpdateParams, VerificationData
Constant Summary collapse
- OBJECT_NAME =
"issuing.authorization"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
The total amount that was authorized or rejected.
-
#amount_details ⇒ Object
readonly
Detailed breakdown of amount components.
-
#approved ⇒ Object
readonly
Whether the authorization has been approved.
-
#authorization_method ⇒ Object
readonly
How the card details were provided.
-
#balance_transactions ⇒ Object
readonly
List of balance transactions associated with this authorization.
-
#card ⇒ Object
readonly
You can [create physical or virtual cards](stripe.com/docs/issuing) that are issued to cardholders.
-
#cardholder ⇒ Object
readonly
The cardholder to whom this authorization belongs.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#currency ⇒ Object
readonly
The currency of the cardholder.
-
#fleet ⇒ Object
readonly
Fleet-specific information for authorizations using Fleet cards.
-
#fraud_challenges ⇒ Object
readonly
Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons.
-
#fuel ⇒ Object
readonly
Information about fuel that was purchased with this transaction.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#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.
-
#merchant_amount ⇒ Object
readonly
The total amount that was authorized or rejected.
-
#merchant_currency ⇒ Object
readonly
The local currency that was presented to the cardholder for the authorization.
-
#merchant_data ⇒ Object
readonly
Attribute for field merchant_data.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#network_data ⇒ Object
readonly
Details about the authorization, such as identifiers, set by the card network.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#pending_request ⇒ Object
readonly
The pending authorization request.
-
#request_history ⇒ Object
readonly
History of every time a ‘pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls).
-
#status ⇒ Object
readonly
The current status of the authorization in its lifecycle.
-
#token ⇒ Object
readonly
[Token](stripe.com/docs/api/issuing/tokens/object) object used for this authorization.
-
#transactions ⇒ Object
readonly
List of [transactions](stripe.com/docs/api/issuing/transactions) associated with this authorization.
-
#treasury ⇒ Object
readonly
[Treasury](stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](stripe.com/docs/api/treasury/financial_accounts).
-
#verification_data ⇒ Object
readonly
Attribute for field verification_data.
-
#verified_by_fraud_challenge ⇒ Object
readonly
Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant.
-
#wallet ⇒ Object
readonly
The digital wallet used for this transaction.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.approve(authorization, params = {}, opts = {}) ⇒ Object
- Deprecated
-
Approves a pending Issuing Authorization object.
-
.decline(authorization, params = {}, opts = {}) ⇒ Object
- Deprecated
-
Declines a pending Issuing Authorization object.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Authorization objects.
- .object_name ⇒ Object
-
.update(authorization, params = {}, opts = {}) ⇒ Object
Updates the specified Issuing Authorization object by setting the values of the parameters passed.
Instance Method Summary collapse
-
#approve(params = {}, opts = {}) ⇒ Object
- Deprecated
-
Approves a pending Issuing Authorization object.
-
#decline(params = {}, opts = {}) ⇒ Object
- Deprecated
-
Declines a pending Issuing Authorization object.
- #test_helpers ⇒ Object
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
#amount ⇒ Object (readonly)
The total amount that was authorized or rejected. This amount is in ‘currency` and in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different.
1225 1226 1227 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1225 def amount @amount end |
#amount_details ⇒ Object (readonly)
Detailed breakdown of amount components. These amounts are denominated in ‘currency` and in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal).
1227 1228 1229 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1227 def amount_details @amount_details end |
#approved ⇒ Object (readonly)
Whether the authorization has been approved.
1229 1230 1231 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1229 def approved @approved end |
#authorization_method ⇒ Object (readonly)
How the card details were provided.
1231 1232 1233 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1231 def @authorization_method end |
#balance_transactions ⇒ Object (readonly)
List of balance transactions associated with this authorization.
1233 1234 1235 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1233 def balance_transactions @balance_transactions end |
#card ⇒ Object (readonly)
You can [create physical or virtual cards](stripe.com/docs/issuing) that are issued to cardholders.
1235 1236 1237 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1235 def card @card end |
#cardholder ⇒ Object (readonly)
The cardholder to whom this authorization belongs.
1237 1238 1239 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1237 def cardholder @cardholder end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
1239 1240 1241 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1239 def created @created end |
#currency ⇒ Object (readonly)
The currency of the cardholder. This currency can be different from the currency presented at authorization and the ‘merchant_currency` field on this authorization. Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).
1241 1242 1243 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1241 def currency @currency end |
#fleet ⇒ Object (readonly)
Fleet-specific information for authorizations using Fleet cards.
1243 1244 1245 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1243 def fleet @fleet end |
#fraud_challenges ⇒ Object (readonly)
Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons.
1245 1246 1247 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1245 def fraud_challenges @fraud_challenges end |
#fuel ⇒ Object (readonly)
Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed.
1247 1248 1249 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1247 def fuel @fuel end |
#id ⇒ Object (readonly)
Unique identifier for the object.
1249 1250 1251 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1249 def id @id 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.
1251 1252 1253 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1251 def livemode @livemode end |
#merchant_amount ⇒ Object (readonly)
The total amount that was authorized or rejected. This amount is in the ‘merchant_currency` and in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different.
1253 1254 1255 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1253 def merchant_amount @merchant_amount end |
#merchant_currency ⇒ Object (readonly)
The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the ‘currency` field on this authorization. Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).
1255 1256 1257 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1255 def merchant_currency @merchant_currency end |
#merchant_data ⇒ Object (readonly)
Attribute for field merchant_data
1257 1258 1259 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1257 def merchant_data @merchant_data 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.
1259 1260 1261 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1259 def @metadata end |
#network_data ⇒ Object (readonly)
Details about the authorization, such as identifiers, set by the card network.
1261 1262 1263 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1261 def network_data @network_data end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
1263 1264 1265 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1263 def object @object end |
#pending_request ⇒ Object (readonly)
The pending authorization request. This field will only be non-null during an ‘issuing_authorization.request` webhook.
1265 1266 1267 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1265 def pending_request @pending_request end |
#request_history ⇒ Object (readonly)
History of every time a ‘pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
1267 1268 1269 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1267 def request_history @request_history end |
#status ⇒ Object (readonly)
The current status of the authorization in its lifecycle.
1269 1270 1271 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1269 def status @status end |
#token ⇒ Object (readonly)
[Token](stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null.
1271 1272 1273 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1271 def token @token end |
#transactions ⇒ Object (readonly)
List of [transactions](stripe.com/docs/api/issuing/transactions) associated with this authorization.
1273 1274 1275 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1273 def transactions @transactions end |
#treasury ⇒ Object (readonly)
[Treasury](stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](stripe.com/docs/api/treasury/financial_accounts).
1275 1276 1277 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1275 def treasury @treasury end |
#verification_data ⇒ Object (readonly)
Attribute for field verification_data
1277 1278 1279 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1277 def verification_data @verification_data end |
#verified_by_fraud_challenge ⇒ Object (readonly)
Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant.
1279 1280 1281 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1279 def verified_by_fraud_challenge @verified_by_fraud_challenge end |
#wallet ⇒ Object (readonly)
The digital wallet used for this transaction. One of ‘apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
1281 1282 1283 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1281 def wallet @wallet end |
Class Method Details
.approve(authorization, params = {}, opts = {}) ⇒ Object
- Deprecated
-
Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1297 1298 1299 1300 1301 1302 1303 1304 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1297 def self.approve(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/authorizations/%<authorization>s/approve", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.decline(authorization, params = {}, opts = {}) ⇒ Object
- Deprecated
-
Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1325 1326 1327 1328 1329 1330 1331 1332 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1325 def self.decline(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/authorizations/%<authorization>s/decline", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.field_remappings ⇒ Object
1515 1516 1517 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1515 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1500 def self.inner_class_types @inner_class_types = { amount_details: AmountDetails, fleet: Fleet, fraud_challenges: FraudChallenge, fuel: Fuel, merchant_data: MerchantData, network_data: NetworkData, pending_request: PendingRequest, request_history: RequestHistory, treasury: Treasury, verification_data: VerificationData, } end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
1340 1341 1342 1343 1344 1345 1346 1347 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1340 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/authorizations", params: params, opts: opts ) end |
.object_name ⇒ Object
17 18 19 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 17 def self.object_name "issuing.authorization" end |
.update(authorization, params = {}, opts = {}) ⇒ Object
Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1350 1351 1352 1353 1354 1355 1356 1357 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1350 def self.update(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/authorizations/%<authorization>s", { authorization: CGI.escape() }), params: params, opts: opts ) end |
Instance Method Details
#approve(params = {}, opts = {}) ⇒ Object
- Deprecated
-
Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1285 1286 1287 1288 1289 1290 1291 1292 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1285 def approve(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/authorizations/%<authorization>s/approve", { authorization: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#decline(params = {}, opts = {}) ⇒ Object
- Deprecated
-
Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
1313 1314 1315 1316 1317 1318 1319 1320 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1313 def decline(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/authorizations/%<authorization>s/decline", { authorization: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#test_helpers ⇒ Object
1359 1360 1361 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1359 def test_helpers TestHelpers.new(self) end |