Class: Stripe::Issuing::Card::TestHelpers

Inherits:
APIResourceTestHelpers show all
Defined in:
lib/stripe/resources/issuing/card.rb

Constant Summary collapse

RESOURCE_CLASS =
Card

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from APIResourceTestHelpers

custom_method, #initialize, resource_url, #resource_url

Methods included from APIOperations::Request

included

Constructor Details

This class inherits a constructor from Stripe::APIResourceTestHelpers

Class Method Details

.deliver_card(card, params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to delivered.



134
135
136
137
138
139
140
141
# File 'lib/stripe/resources/issuing/card.rb', line 134

def self.deliver_card(card, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/deliver", { card: CGI.escape(card) }),
    params: params,
    opts: opts
  )
end

.fail_card(card, params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to failure.



154
155
156
157
158
159
160
161
# File 'lib/stripe/resources/issuing/card.rb', line 154

def self.fail_card(card, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(card) }),
    params: params,
    opts: opts
  )
end

.resource_classObject



129
130
131
# File 'lib/stripe/resources/issuing/card.rb', line 129

def self.resource_class
  "Card"
end

.return_card(card, params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to returned.



174
175
176
177
178
179
180
181
# File 'lib/stripe/resources/issuing/card.rb', line 174

def self.return_card(card, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(card) }),
    params: params,
    opts: opts
  )
end

.ship_card(card, params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to shipped.



194
195
196
197
198
199
200
201
# File 'lib/stripe/resources/issuing/card.rb', line 194

def self.ship_card(card, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(card) }),
    params: params,
    opts: opts
  )
end

.submit_card(card, params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia’ or later.



214
215
216
217
218
219
220
221
# File 'lib/stripe/resources/issuing/card.rb', line 214

def self.submit_card(card, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/submit", { card: CGI.escape(card) }),
    params: params,
    opts: opts
  )
end

Instance Method Details

#deliver_card(params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to delivered.



144
145
146
147
148
149
150
151
# File 'lib/stripe/resources/issuing/card.rb', line 144

def deliver_card(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/deliver", { card: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end

#fail_card(params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to failure.



164
165
166
167
168
169
170
171
# File 'lib/stripe/resources/issuing/card.rb', line 164

def fail_card(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end

#return_card(params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to returned.



184
185
186
187
188
189
190
191
# File 'lib/stripe/resources/issuing/card.rb', line 184

def return_card(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end

#ship_card(params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to shipped.



204
205
206
207
208
209
210
211
# File 'lib/stripe/resources/issuing/card.rb', line 204

def ship_card(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end

#submit_card(params = {}, opts = {}) ⇒ Object

Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia’ or later.



224
225
226
227
228
229
230
231
# File 'lib/stripe/resources/issuing/card.rb', line 224

def submit_card(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/submit", { card: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end