Class: Stripe::Refund::TestHelpers

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

Constant Summary collapse

RESOURCE_CLASS =
Refund

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

.expire(refund, params = {}, opts = {}) ⇒ Object

Expire a refund with a status of requires_action.



87
88
89
90
91
92
93
94
# File 'lib/stripe/resources/refund.rb', line 87

def self.expire(refund, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/refunds/%<refund>s/expire", { refund: CGI.escape(refund) }),
    params: params,
    opts: opts
  )
end

.resource_classObject



82
83
84
# File 'lib/stripe/resources/refund.rb', line 82

def self.resource_class
  "Refund"
end

Instance Method Details

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

Expire a refund with a status of requires_action.



97
98
99
100
101
102
103
104
# File 'lib/stripe/resources/refund.rb', line 97

def expire(params = {}, opts = {})
  @resource.request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/refunds/%<refund>s/expire", { refund: CGI.escape(@resource["id"]) }),
    params: params,
    opts: opts
  )
end