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](docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.

This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).



113
114
115
116
117
118
119
120
121
# File 'lib/stripe/services/issuing/authorization_service.rb', line 113

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](docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.

This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).



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

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.



136
137
138
139
140
141
142
143
144
# File 'lib/stripe/services/issuing/authorization_service.rb', line 136

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.



147
148
149
150
151
152
153
154
155
# File 'lib/stripe/services/issuing/authorization_service.rb', line 147

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.



158
159
160
161
162
163
164
165
166
# File 'lib/stripe/services/issuing/authorization_service.rb', line 158

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