Class: Stripe::Issuing::Authorization
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Issuing::Authorization
- Extended by:
- 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: TestHelpers
Constant Summary collapse
- OBJECT_NAME =
"issuing.authorization"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary
Attributes inherited from APIResource
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.
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
#==, #[], #[]=, 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
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](stripe.com/docs/issuing/controls/real-time-authorizations) flow.
This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
41 42 43 44 45 46 47 48 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 41 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](stripe.com/docs/issuing/controls/real-time-authorizations) flow.
This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
52 53 54 55 56 57 58 59 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 52 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 |
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](stripe.com/docs/issuing/controls/real-time-authorizations) flow.
This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
19 20 21 22 23 24 25 26 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 19 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](stripe.com/docs/issuing/controls/real-time-authorizations) flow.
This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
30 31 32 33 34 35 36 37 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 30 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
61 62 63 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 61 def test_helpers TestHelpers.new(self) end |