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.



48
49
50
51
52
53
54
55
# File 'lib/stripe/resources/issuing/card.rb', line 48

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.



68
69
70
71
72
73
74
75
# File 'lib/stripe/resources/issuing/card.rb', line 68

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



43
44
45
# File 'lib/stripe/resources/issuing/card.rb', line 43

def self.resource_class
  "Card"
end

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

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



88
89
90
91
92
93
94
95
# File 'lib/stripe/resources/issuing/card.rb', line 88

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.



108
109
110
111
112
113
114
115
# File 'lib/stripe/resources/issuing/card.rb', line 108

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.



128
129
130
131
132
133
134
135
# File 'lib/stripe/resources/issuing/card.rb', line 128

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.



58
59
60
61
62
63
64
65
# File 'lib/stripe/resources/issuing/card.rb', line 58

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.



78
79
80
81
82
83
84
85
# File 'lib/stripe/resources/issuing/card.rb', line 78

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.



98
99
100
101
102
103
104
105
# File 'lib/stripe/resources/issuing/card.rb', line 98

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.



118
119
120
121
122
123
124
125
# File 'lib/stripe/resources/issuing/card.rb', line 118

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.



138
139
140
141
142
143
144
145
# File 'lib/stripe/resources/issuing/card.rb', line 138

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