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: TestHelpers
Constant Summary collapse
- OBJECT_NAME =
"issuing.authorization"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary
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.
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Issuing Authorization objects.
- .object_name ⇒ Object
-
.update(id, 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
#==, #[], #[]=, 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).
35 36 37 38 39 40 41 42 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 35 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).
62 63 64 65 66 67 68 69 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 62 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 |
.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.
76 77 78 79 80 81 82 83 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 76 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(id, 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.
86 87 88 89 90 91 92 93 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 86 def self.update(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/issuing/authorizations/%<id>s", { id: CGI.escape(id) }), 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).
23 24 25 26 27 28 29 30 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 23 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).
50 51 52 53 54 55 56 57 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 50 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
95 96 97 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 95 def test_helpers TestHelpers.new(self) end |