rail0-sdk 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/rail0/resources/payments.rb +18 -0
- data/lib/rail0/types.rb +0 -10
- data/lib/rail0/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5432df0776e08a77c56678e4e977d87c81ddf2be6176fef59a95051e287a6ce9
|
|
4
|
+
data.tar.gz: 7747a265cc8d84f243a09a8b1ab66e3cba545a3817554bc321dc5aa9eaed34be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 440edc898e25a83ad3c76615777b4074f7daf003904db75129df01c4fcb223aebad7e5a1e425212207842aa334cdab1bccfe79a0023fcf08578d5bc09da8462a
|
|
7
|
+
data.tar.gz: 7482c21a09309b6dabe1f26c4b19b29890d8b8dfc679d4fc1b15d8b1de76a39b2f5998414e2e28ab3ee840edc2e31e7531ebe3b215c0a308f92068d0754ac46a
|
data/README.md
CHANGED
|
@@ -378,6 +378,10 @@ client.payments.create(params, idempotency_key: nil) # or keyword fields
|
|
|
378
378
|
# Reusing a key for DIFFERENT terms raises Rail0::ApiError with code
|
|
379
379
|
# "idempotency_key_reused" (422) instead of returning the first payment.
|
|
380
380
|
client.payments.get(id)
|
|
381
|
+
client.payments.update(id, description: "Order #42") # → the payment, same shape as get
|
|
382
|
+
client.payments.update(id, description: nil) # nil (or "") clears it
|
|
383
|
+
# The description is the only editable field: off-chain, so any status, settled included.
|
|
384
|
+
# Payer or payee only (a non-participant gets 404); over 255 characters is a 422.
|
|
381
385
|
client.payments.list(status: "authorized", disputed: false, chain_id: 84532, sort: "-created_at")
|
|
382
386
|
client.payments.list(status: %w[authorized expired]) # any of several states → ?status=authorized,expired
|
|
383
387
|
client.payments.list(operation: "refund") # payments with at least one refund transaction
|
|
@@ -102,6 +102,24 @@ module Rail0
|
|
|
102
102
|
http.get("/payments/#{segment(id)}")
|
|
103
103
|
end
|
|
104
104
|
|
|
105
|
+
# Set or clear a payment's description (PATCH /payments/{id}).
|
|
106
|
+
#
|
|
107
|
+
# The description is the only field this route edits: it is off-chain metadata, so
|
|
108
|
+
# it can change at any status, settled payments included. Only a participant (the
|
|
109
|
+
# payer or the payee) may edit it — a non-participant gets the same 404 as an unknown
|
|
110
|
+
# id, and a deactivated caller wallet a 403 `wallet_deactivated`.
|
|
111
|
+
#
|
|
112
|
+
# +description:+ is required, and is always sent: passing +nil+ sends JSON +null+,
|
|
113
|
+
# which clears it (as does +""+). Over 255 characters is a 422.
|
|
114
|
+
# (rail0-gateway#373)
|
|
115
|
+
#
|
|
116
|
+
# @param id [String] Payment UUID or rail0_id.
|
|
117
|
+
# @param description [String, nil] The new description; +nil+ or +""+ clears it.
|
|
118
|
+
# @return [Hash] The updated payment, the same shape {get} returns.
|
|
119
|
+
def update(id, description:)
|
|
120
|
+
http.patch("/payments/#{segment(id)}", { description: description })
|
|
121
|
+
end
|
|
122
|
+
|
|
105
123
|
# List on-chain transactions for a payment.
|
|
106
124
|
# @param id [String] Payment UUID or rail0_id.
|
|
107
125
|
# @param operation [String, nil] Filter by operation (see {TRANSACTION_OPERATIONS} —
|
data/lib/rail0/types.rb
CHANGED
|
@@ -173,16 +173,6 @@ module Rail0
|
|
|
173
173
|
keyword_init: true
|
|
174
174
|
)
|
|
175
175
|
|
|
176
|
-
# A wallet's token holding, with the wallet, token, and blockchain nested via their own schemas.
|
|
177
|
-
WalletToken = Struct.new(
|
|
178
|
-
:default, # Boolean
|
|
179
|
-
:active, # Boolean
|
|
180
|
-
:wallet, # Wallet
|
|
181
|
-
:token, # Token
|
|
182
|
-
:blockchain, # Blockchain
|
|
183
|
-
keyword_init: true
|
|
184
|
-
)
|
|
185
|
-
|
|
186
176
|
# A wallet's token holding as nested under its wallet (GET /accounts/:id/wallets): the token plus
|
|
187
177
|
# this wallet's per-token flags, without re-nesting the wallet.
|
|
188
178
|
WalletTokenHolding = Struct.new(
|
data/lib/rail0/version.rb
CHANGED
|
@@ -5,5 +5,5 @@ module Rail0
|
|
|
5
5
|
# consumed by path from a sibling checkout, where the number bought nothing: no registry
|
|
6
6
|
# ever served a 1.x, no tag was ever cut, and the one consumer resolves the working tree.
|
|
7
7
|
# Publishing from 1.2.0 would have implied two releases nobody can install.
|
|
8
|
-
VERSION = "1.
|
|
8
|
+
VERSION = "1.4.0"
|
|
9
9
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rail0-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Commerce Layer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: logger
|