Class: Stripe::Crypto::DepositAddress

Inherits:
APIResource show all
Extended by:
APIOperations::Create, APIOperations::List
Defined in:
lib/stripe/resources/crypto/deposit_address.rb

Overview

A crypto deposit address is a blockchain address that can be used by a merchant for deposit mode crypto payments.

Related guide: Machine payments

Defined Under Namespace

Classes: SupportedToken

Constant Summary collapse

OBJECT_NAME =
"crypto.deposit_address"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods included from APIOperations::Create

create

Methods included from APIOperations::List

list

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#addressObject (readonly)

The on-chain address where funds can be received.



33
34
35
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 33

def address
  @address
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



35
36
37
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 35

def created
  @created
end

#customerObject (readonly)

If set, this deposit address is scoped to a Customer and can only receive funds from that customer. Otherwise, this deposit address can receive funds from any customer.



37
38
39
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 37

def customer
  @customer
end

#idObject (readonly)

Unique identifier for the object.



39
40
41
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 39

def id
  @id
end

#livemodeObject (readonly)

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.



41
42
43
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 41

def livemode
  @livemode
end

#metadataObject (readonly)

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



43
44
45
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 43

def 
  @metadata
end

#networkObject (readonly)

The blockchain network where this address can accept funds.



45
46
47
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 45

def network
  @network
end

#objectObject (readonly)

String representing the object's type. Objects of the same type share the same value.



47
48
49
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 47

def object
  @object
end

#supported_tokensObject (readonly)

The tokens that can be sent to this deposit address on its network.



49
50
51
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 49

def supported_tokens
  @supported_tokens
end

Class 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.



53
54
55
56
57
58
59
60
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 53

def self.create(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: "/v1/crypto/deposit_addresses",
    params: params,
    opts: opts
  )
end

.field_remappingsObject



77
78
79
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 77

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



73
74
75
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 73

def self.inner_class_types
  @inner_class_types = { supported_tokens: SupportedToken }
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.



64
65
66
67
68
69
70
71
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 64

def self.list(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/crypto/deposit_addresses",
    params: params,
    opts: opts
  )
end

.object_nameObject



14
15
16
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 14

def self.object_name
  "crypto.deposit_address"
end