Class: Stripe::Issuing::AuthorizationService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/issuing/authorization_service.rb

Defined Under Namespace

Classes: ApproveParams, DeclineParams, ListParams, RetrieveParams, UpdateParams

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance 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).



127
128
129
130
131
132
133
134
135
# File 'lib/stripe/services/issuing/authorization_service.rb', line 127

def approve(authorization, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/issuing/authorizations/%<authorization>s/approve", { authorization: CGI.escape(authorization) }),
    params: params,
    opts: opts,
    base_address: :api
  )
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).



139
140
141
142
143
144
145
146
147
# File 'lib/stripe/services/issuing/authorization_service.rb', line 139

def decline(authorization, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/issuing/authorizations/%<authorization>s/decline", { authorization: CGI.escape(authorization) }),
    params: params,
    opts: opts,
    base_address: :api
  )
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.



150
151
152
153
154
155
156
157
158
# File 'lib/stripe/services/issuing/authorization_service.rb', line 150

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v1/issuing/authorizations",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(authorization, params = {}, opts = {}) ⇒ Object

Retrieves an Issuing Authorization object.



161
162
163
164
165
166
167
168
169
# File 'lib/stripe/services/issuing/authorization_service.rb', line 161

def retrieve(authorization, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/issuing/authorizations/%<authorization>s", { authorization: CGI.escape(authorization) }),
    params: params,
    opts: opts,
    base_address: :api
  )
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.



172
173
174
175
176
177
178
179
180
# File 'lib/stripe/services/issuing/authorization_service.rb', line 172

def update(authorization, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/issuing/authorizations/%<authorization>s", { authorization: CGI.escape(authorization) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end