Class: Stripe::Treasury::InboundTransferService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/treasury/inbound_transfer_service.rb

Defined Under Namespace

Classes: CancelParams, CreateParams, ListParams, RetrieveParams

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

#cancel(inbound_transfer, params = {}, opts = {}) ⇒ Object

Cancels an InboundTransfer.



96
97
98
99
100
101
102
103
104
# File 'lib/stripe/services/treasury/inbound_transfer_service.rb', line 96

def cancel(inbound_transfer, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/treasury/inbound_transfers/%<inbound_transfer>s/cancel", { inbound_transfer: CGI.escape(inbound_transfer) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

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

Creates an InboundTransfer.



107
108
109
110
111
112
113
114
115
# File 'lib/stripe/services/treasury/inbound_transfer_service.rb', line 107

def create(params = {}, opts = {})
  request(
    method: :post,
    path: "/v1/treasury/inbound_transfers",
    params: params,
    opts: opts,
    base_address: :api
  )
end

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

Returns a list of InboundTransfers sent from the specified FinancialAccount.



118
119
120
121
122
123
124
125
126
# File 'lib/stripe/services/treasury/inbound_transfer_service.rb', line 118

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v1/treasury/inbound_transfers",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(id, params = {}, opts = {}) ⇒ Object

Retrieves the details of an existing InboundTransfer.



129
130
131
132
133
134
135
136
137
# File 'lib/stripe/services/treasury/inbound_transfer_service.rb', line 129

def retrieve(id, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/treasury/inbound_transfers/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end