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

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

Defined Under Namespace

Classes: DeliverCardParams, FailCardParams, ReturnCardParams, ShipCardParams, SubmitCardParams

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.



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

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.



65
66
67
68
69
70
71
72
73
# File 'lib/stripe/services/test_helpers/issuing/card_service.rb', line 65

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.



76
77
78
79
80
81
82
83
84
# File 'lib/stripe/services/test_helpers/issuing/card_service.rb', line 76

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.



87
88
89
90
91
92
93
94
95
# File 'lib/stripe/services/test_helpers/issuing/card_service.rb', line 87

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.



98
99
100
101
102
103
104
105
106
# File 'lib/stripe/services/test_helpers/issuing/card_service.rb', line 98

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