Class: Stripe::Crypto::DepositAddress
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Crypto::DepositAddress
- 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
-
#address ⇒ Object
readonly
The on-chain address where funds can be received.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#customer ⇒ Object
readonly
If set, this deposit address is scoped to a Customer and can only receive funds from that customer.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#metadata ⇒ Object
readonly
Set of key-value pairs that you can attach to an object.
-
#network ⇒ Object
readonly
The blockchain network where this address can accept funds.
-
#object ⇒ Object
readonly
String representing the object's type.
-
#supported_tokens ⇒ Object
readonly
The tokens that can be sent to this deposit address on its network.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Creates a new crypto deposit address for the authenticated merchant on the specified network.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Lists crypto deposit addresses for the authenticated merchant.
- .object_name ⇒ Object
Methods included from APIOperations::Create
Methods included from APIOperations::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
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
#address ⇒ Object (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 |
#created ⇒ Object (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 |
#customer ⇒ Object (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 |
#id ⇒ Object (readonly)
Unique identifier for the object.
39 40 41 |
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 39 def id @id end |
#livemode ⇒ Object (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 |
#metadata ⇒ Object (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 |
#network ⇒ Object (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 |
#object ⇒ Object (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_tokens ⇒ Object (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_remappings ⇒ Object
77 78 79 |
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 77 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
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_name ⇒ Object
14 15 16 |
# File 'lib/stripe/resources/crypto/deposit_address.rb', line 14 def self.object_name "crypto.deposit_address" end |