Class: Stripe::TestHelpers::Issuing::CardService

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

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

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

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



9
10
11
12
13
14
15
16
17
# File 'lib/stripe/services/test_helpers/issuing/card_service.rb', line 9

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

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

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



20
21
22
23
24
25
26
27
28
# File 'lib/stripe/services/test_helpers/issuing/card_service.rb', line 20

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

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

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



31
32
33
34
35
36
37
38
39
# File 'lib/stripe/services/test_helpers/issuing/card_service.rb', line 31

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

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

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



42
43
44
45
46
47
48
49
50
# File 'lib/stripe/services/test_helpers/issuing/card_service.rb', line 42

def ship_card(card, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(card) }),
    params: params,
    opts: opts,
    base_address: :api
  )
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.



53
54
55
56
57
58
59
60
61
# File 'lib/stripe/services/test_helpers/issuing/card_service.rb', line 53

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