Class: Stripe::Treasury::OutboundTransfer::TestHelpers

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

Constant Summary collapse

RESOURCE_CLASS =
OutboundTransfer

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

.fail(outbound_transfer, params = {}, opts = {}) ⇒ Object


37
38
39
40
41
42
43
44
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 37

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

.post(outbound_transfer, params = {}, opts = {}) ⇒ Object


46
47
48
49
50
51
52
53
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 46

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

.return_outbound_transfer(outbound_transfer, params = {}, opts = {}) ⇒ Object


55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 55

def self.return_outbound_transfer(
  outbound_transfer,
  params = {},
  opts = {}
)
  request_stripe_object(
    method: :post,
    path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/return", { outbound_transfer: CGI.escape(outbound_transfer) }),
    params: params,
    opts: opts
  )
end

Instance Method Details

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


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

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

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


77
78
79
80
81
82
83
84
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 77

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

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


86
87
88
89
90
91
92
93
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 86

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