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.



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

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.



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

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.



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

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.



141
142
143
144
145
146
147
148
149
# File 'lib/stripe/services/treasury/inbound_transfer_service.rb', line 141

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