Class: Stripe::Crypto::DepositAddressService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/crypto/deposit_address_service.rb

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

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

Creates a new crypto deposit address for the authenticated merchant on the specified network. The returned address can be used across multiple PaymentIntents.



9
10
11
12
13
14
15
16
17
# File 'lib/stripe/services/crypto/deposit_address_service.rb', line 9

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

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

Lists crypto deposit addresses for the authenticated merchant. Supports cursor-based pagination and optional filtering by customer, network, or on-chain address.



21
22
23
24
25
26
27
28
29
# File 'lib/stripe/services/crypto/deposit_address_service.rb', line 21

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

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

Retrieves the details of an existing crypto deposit address by ID.



32
33
34
35
36
37
38
39
40
# File 'lib/stripe/services/crypto/deposit_address_service.rb', line 32

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