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
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(filters = {}, 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).
33 34 35 36 37 38 39 40 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 33 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).
55 56 57 58 59 60 61 62 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 55 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(filters = {}, 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.
65 66 67 68 69 70 71 72 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 65 def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/authorizations", params: filters, opts: opts ) end |
.object_name ⇒ Object
16 17 18 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 16 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.
75 76 77 78 79 80 81 82 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 75 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).
22 23 24 25 26 27 28 29 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 22 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).
44 45 46 47 48 49 50 51 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 44 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
84 85 86 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 84 def test_helpers TestHelpers.new(self) end |