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.



22
23
24
25
26
27
28
29
# File 'lib/stripe/resources/issuing/card.rb', line 22

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.



32
33
34
35
36
37
38
39
# File 'lib/stripe/resources/issuing/card.rb', line 32

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

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

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



42
43
44
45
46
47
48
49
# File 'lib/stripe/resources/issuing/card.rb', line 42

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.



52
53
54
55
56
57
58
59
# File 'lib/stripe/resources/issuing/card.rb', line 52

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

Instance Method Details

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

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



62
63
64
65
66
67
68
69
# File 'lib/stripe/resources/issuing/card.rb', line 62

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.



72
73
74
75
76
77
78
79
# File 'lib/stripe/resources/issuing/card.rb', line 72

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.



82
83
84
85
86
87
88
89
# File 'lib/stripe/resources/issuing/card.rb', line 82

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.



92
93
94
95
96
97
98
99
# File 'lib/stripe/resources/issuing/card.rb', line 92

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