Class: Stripe::Issuing::Authorization::TestHelpers
- Inherits:
-
APIResourceTestHelpers
- Object
- APIResourceTestHelpers
- Stripe::Issuing::Authorization::TestHelpers
- Defined in:
- lib/stripe/resources/issuing/authorization.rb
Constant Summary collapse
- RESOURCE_CLASS =
Authorization
Class Method Summary collapse
-
.capture(authorization, params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
-
.create(params = {}, opts = {}) ⇒ Object
Create a test-mode authorization.
-
.expire(authorization, params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
-
.increment(authorization, params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
- .resource_class ⇒ Object
-
.reverse(authorization, params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
Instance Method Summary collapse
-
#capture(params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
-
#expire(params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
-
#increment(params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
-
#reverse(params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
Methods inherited from APIResourceTestHelpers
custom_method, #initialize, resource_url, #resource_url
Methods included from APIOperations::Request
Constructor Details
This class inherits a constructor from Stripe::APIResourceTestHelpers
Class Method Details
.capture(authorization, params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
95 96 97 98 99 100 101 102 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 95 def self.capture(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.create(params = {}, opts = {}) ⇒ Object
Create a test-mode authorization.
115 116 117 118 119 120 121 122 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 115 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/test_helpers/issuing/authorizations", params: params, opts: opts ) end |
.expire(authorization, params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
125 126 127 128 129 130 131 132 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 125 def self.expire(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.increment(authorization, params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
145 146 147 148 149 150 151 152 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 145 def self.increment(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.resource_class ⇒ Object
90 91 92 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 90 def self.resource_class "Authorization" end |
.reverse(authorization, params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
165 166 167 168 169 170 171 172 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 165 def self.reverse(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape() }), params: params, opts: opts ) end |
Instance Method Details
#capture(params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
105 106 107 108 109 110 111 112 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 105 def capture(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#expire(params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
135 136 137 138 139 140 141 142 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 135 def expire(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#increment(params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
155 156 157 158 159 160 161 162 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 155 def increment(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#reverse(params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
175 176 177 178 179 180 181 182 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 175 def reverse(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |