straddle 0.4.0 → 0.5.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/CHANGELOG.md +53 -0
- data/README.md +23 -1
- data/lib/straddle/client.rb +15 -1
- data/lib/straddle/internal/transport/base_client.rb +5 -0
- data/lib/straddle/internal/util.rb +22 -7
- data/lib/straddle/models/charge_create_params.rb +2 -0
- data/lib/straddle/models/charge_unmask_response.rb +142 -11
- data/lib/straddle/models/charge_v1.rb +140 -11
- data/lib/straddle/models/embed/account_list_params.rb +8 -1
- data/lib/straddle/models/embed/representative.rb +2 -2
- data/lib/straddle/models/embed/representative_create_params.rb +2 -2
- data/lib/straddle/models/embed/representative_paged.rb +2 -2
- data/lib/straddle/models/embed/representative_update_params.rb +2 -2
- data/lib/straddle/models/paykey_list_params.rb +17 -1
- data/lib/straddle/models/payment_list_params.rb +55 -1
- data/lib/straddle/models/payment_summary_paged_v1.rb +98 -1
- data/lib/straddle/models/payout_create_params.rb +2 -0
- data/lib/straddle/models/payout_unmask_response.rb +145 -11
- data/lib/straddle/models/payout_upload_authorization_document_params.rb +57 -0
- data/lib/straddle/models/payout_v1.rb +140 -11
- data/lib/straddle/models.rb +2 -0
- data/lib/straddle/resources/embed/accounts.rb +5 -2
- data/lib/straddle/resources/paykeys.rb +7 -1
- data/lib/straddle/resources/payments.rb +19 -1
- data/lib/straddle/resources/payouts.rb +49 -0
- data/lib/straddle/version.rb +1 -1
- data/lib/straddle.rb +1 -0
- data/rbi/straddle/internal/util.rbi +8 -0
- data/rbi/straddle/models/charge_create_params.rbi +10 -0
- data/rbi/straddle/models/charge_unmask_response.rbi +287 -34
- data/rbi/straddle/models/charge_v1.rbi +268 -39
- data/rbi/straddle/models/embed/account_list_params.rbi +9 -0
- data/rbi/straddle/models/embed/representative.rbi +2 -2
- data/rbi/straddle/models/embed/representative_create_params.rbi +2 -2
- data/rbi/straddle/models/embed/representative_paged.rbi +2 -2
- data/rbi/straddle/models/embed/representative_update_params.rbi +2 -2
- data/rbi/straddle/models/paykey_list_params.rbi +22 -0
- data/rbi/straddle/models/payment_list_params.rbi +75 -0
- data/rbi/straddle/models/payment_summary_paged_v1.rbi +198 -3
- data/rbi/straddle/models/payout_create_params.rbi +10 -0
- data/rbi/straddle/models/payout_unmask_response.rbi +287 -34
- data/rbi/straddle/models/payout_upload_authorization_document_params.rbi +88 -0
- data/rbi/straddle/models/payout_v1.rbi +268 -39
- data/rbi/straddle/models.rbi +3 -0
- data/rbi/straddle/resources/embed/accounts.rbi +3 -0
- data/rbi/straddle/resources/paykeys.rbi +6 -0
- data/rbi/straddle/resources/payments.rbi +20 -0
- data/rbi/straddle/resources/payouts.rbi +33 -0
- data/sig/straddle/internal/util.rbs +4 -0
- data/sig/straddle/models/charge_create_params.rbs +4 -0
- data/sig/straddle/models/charge_unmask_response.rbs +120 -11
- data/sig/straddle/models/charge_v1.rbs +120 -11
- data/sig/straddle/models/embed/account_list_params.rbs +7 -0
- data/sig/straddle/models/paykey_list_params.rbs +14 -0
- data/sig/straddle/models/payment_list_params.rbs +57 -2
- data/sig/straddle/models/payment_summary_paged_v1.rbs +78 -3
- data/sig/straddle/models/payout_create_params.rbs +4 -0
- data/sig/straddle/models/payout_unmask_response.rbs +120 -11
- data/sig/straddle/models/payout_upload_authorization_document_params.rbs +59 -0
- data/sig/straddle/models/payout_v1.rbs +120 -11
- data/sig/straddle/models.rbs +2 -0
- data/sig/straddle/resources/embed/accounts.rbs +1 -0
- data/sig/straddle/resources/paykeys.rbs +2 -0
- data/sig/straddle/resources/payments.rbs +6 -0
- data/sig/straddle/resources/payouts.rbs +10 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c565d8666792b9e9e15e8037302268c3be6544daa5c3e230411d2c835e0e82ff
|
|
4
|
+
data.tar.gz: 721c8b3563e20f209e8bebdb74bb3c50a7b230c82f9eca7e4699827d8c0906a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06a0293faaecfa000fd3af9a8f58695c57632560055a8dda0ffa15a35d3407240b29e5f6a5a6eed792aded8594988e06c143d881caa7a7896f33aa321c4378f8
|
|
7
|
+
data.tar.gz: 7b852b929d99776ba583e670adb08e5ddcfe4c418110659a38298be600b14d8a9b87d964b1eb9c6b75b6d0ee2d560a638c9cae00eeeff20d59436e8e326ad5d3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 (2026-08-20)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/straddleio/straddle-ruby/compare/v0.4.0...v0.5.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **docs:** Preliminary update to SDK Spec ([e7b29ac](https://github.com/straddleio/straddle-ruby/commit/e7b29ac6f7e7f724df5efe7363b660e8f9a89cfa))
|
|
10
|
+
* **docs:** Preliminary update to SDK Spec ([ed5e050](https://github.com/straddleio/straddle-ruby/commit/ed5e05094ff6f4a235ef5391e2f703fb407f6d3b))
|
|
11
|
+
* **docs:** Preliminary update to SDK Spec ([7c0bb4e](https://github.com/straddleio/straddle-ruby/commit/7c0bb4ef05b1a44561b64fb5a79c630872749059))
|
|
12
|
+
* **docs:** Preliminary update to SDK Spec ([7002bf6](https://github.com/straddleio/straddle-ruby/commit/7002bf6fac839b1dc36efb16dd314de81233989d))
|
|
13
|
+
* **docs:** Preliminary update to SDK Spec ([c47e7c8](https://github.com/straddleio/straddle-ruby/commit/c47e7c8b792f4ad29d58c0de1ed0b0b798387bb1))
|
|
14
|
+
* **docs:** Preliminary update to SDK Spec ([26c3cb7](https://github.com/straddleio/straddle-ruby/commit/26c3cb7493ee9dbfc74d6ca50957ec389e17b6e3))
|
|
15
|
+
* **docs:** Preliminary update to SDK Spec ([e0cc45e](https://github.com/straddleio/straddle-ruby/commit/e0cc45ee2fa2e92222c197a5f623c4646db4a150))
|
|
16
|
+
* **docs:** Preliminary update to SDK Spec ([f6ff7e9](https://github.com/straddleio/straddle-ruby/commit/f6ff7e965acc866271017a12571d9cd9cbe3555e))
|
|
17
|
+
* **docs:** Preliminary update to SDK Spec ([069900e](https://github.com/straddleio/straddle-ruby/commit/069900e9afbc11761aaaba9bf2da9ca483eb91b9))
|
|
18
|
+
* **docs:** Preliminary update to SDK Spec ([b75c086](https://github.com/straddleio/straddle-ruby/commit/b75c08610abfb58987d3e4f967e86fec6d0858f1))
|
|
19
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([a22c44c](https://github.com/straddleio/straddle-ruby/commit/a22c44c216033b0e7139e2a7a145aff4306f5aab))
|
|
20
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([288cb36](https://github.com/straddleio/straddle-ruby/commit/288cb36bc01644ad79b36a74a51bca05823e601d))
|
|
21
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([2054d2d](https://github.com/straddleio/straddle-ruby/commit/2054d2d6013b2a5e9590b9c367691940dad6a35a))
|
|
22
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([00ed553](https://github.com/straddleio/straddle-ruby/commit/00ed5533f68d5a5544bdad919cad27f4c7cffcd1))
|
|
23
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([7002e3b](https://github.com/straddleio/straddle-ruby/commit/7002e3b61de10383548251a079dee909e012b5d7))
|
|
24
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([400fba0](https://github.com/straddleio/straddle-ruby/commit/400fba0874ab2c2cab4f5c563c70c1b5133a8d9c))
|
|
25
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([0b6a3e6](https://github.com/straddleio/straddle-ruby/commit/0b6a3e62ce018a034b1a22f52be0c541d9db8aa6))
|
|
26
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([1a6840c](https://github.com/straddleio/straddle-ruby/commit/1a6840c843dba1f817dcbac2b224536ae69810cb))
|
|
27
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([c9e050b](https://github.com/straddleio/straddle-ruby/commit/c9e050b1e63ae60c5946bcd96523fdc9101529ef))
|
|
28
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([dc39609](https://github.com/straddleio/straddle-ruby/commit/dc39609d6658b6e2c137047eaa07d09e03fe3bbe))
|
|
29
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([efed5dd](https://github.com/straddleio/straddle-ruby/commit/efed5ddd1f6b99bf5eddaf61e169682c1dd6eee9))
|
|
30
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([977268e](https://github.com/straddleio/straddle-ruby/commit/977268e0e20e577961ab293ef45742e6b1f225aa))
|
|
31
|
+
* **docs:** Release Updates to SDK based on Open API Spec (Final) ([0ffc081](https://github.com/straddleio/straddle-ruby/commit/0ffc081971f6bb4097bc432c2851064842a31d78))
|
|
32
|
+
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([8510658](https://github.com/straddleio/straddle-ruby/commit/85106582fe5e52651f06179d95406fdfbe01514e))
|
|
33
|
+
* support setting headers via env ([1035a65](https://github.com/straddleio/straddle-ruby/commit/1035a65355f65811ae5a5e93ef3fb8fed7d64061))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* align path encoding with RFC 3986 section 3.3 ([a1c1ca0](https://github.com/straddleio/straddle-ruby/commit/a1c1ca05b98340a96927e521646b98ec7127c388))
|
|
39
|
+
* **client:** elide content type header on requests without body ([f8b0052](https://github.com/straddleio/straddle-ruby/commit/f8b0052437d42a064e2f99eb3369d83253bd0020))
|
|
40
|
+
* **client:** send content-type header for requests with an omitted optional body ([c7d6ae5](https://github.com/straddleio/straddle-ruby/commit/c7d6ae5c76e1688bf57b094759c95d5f99c3d993))
|
|
41
|
+
* **internal:** correct multipart form field name encoding ([c3fe8ba](https://github.com/straddleio/straddle-ruby/commit/c3fe8baca80d691689f17cf3ff465094bfe86fd9))
|
|
42
|
+
* multipart encoding for file arrays ([b45ee2f](https://github.com/straddleio/straddle-ruby/commit/b45ee2ff796e02cc8f2386219fb6d7c2716cd03a))
|
|
43
|
+
* variable name typo ([3840f23](https://github.com/straddleio/straddle-ruby/commit/3840f23f47dead5d75012c9071a06b1a33dc92ec))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Chores
|
|
47
|
+
|
|
48
|
+
* **ci:** support opting out of skipping builds on metadata-only commits ([d92ad12](https://github.com/straddleio/straddle-ruby/commit/d92ad12b3d78aa92e5aeba1c39d12bfc7917420b))
|
|
49
|
+
* **internal:** allow the mock server port to be set with STAINLESS_MOCK_PORT ([c45511c](https://github.com/straddleio/straddle-ruby/commit/c45511c71f985869840a1f41a178e759ee6038d4))
|
|
50
|
+
* **internal:** bound formatter parallelism to CPU count ([6434980](https://github.com/straddleio/straddle-ruby/commit/64349804ab8b9ad6263e156c7007136dda591c4c))
|
|
51
|
+
* **internal:** more robust bootstrap script ([1a07668](https://github.com/straddleio/straddle-ruby/commit/1a076684b8e059d19bc70380ac4ffc7719fa8b61))
|
|
52
|
+
* **tests:** bump steady to v0.20.1 ([b415e2c](https://github.com/straddleio/straddle-ruby/commit/b415e2c8779f8fefb4190303d42e624ce7d32b7d))
|
|
53
|
+
* **tests:** bump steady to v0.20.2 ([0b8bd79](https://github.com/straddleio/straddle-ruby/commit/0b8bd793d05c72366b45bbeee667897d0675bf45))
|
|
54
|
+
* **tests:** bump steady to v0.22.1 ([acfadaa](https://github.com/straddleio/straddle-ruby/commit/acfadaaf986ebd3eca6851eee5617345e061865c))
|
|
55
|
+
|
|
3
56
|
## 0.4.0 (2026-03-25)
|
|
4
57
|
|
|
5
58
|
Full Changelog: [v0.3.0...v0.4.0](https://github.com/straddleio/straddle-ruby/compare/v0.3.0...v0.4.0)
|
data/README.md
CHANGED
|
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
26
26
|
<!-- x-release-please-start-version -->
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
|
-
gem "straddle", "~> 0.
|
|
29
|
+
gem "straddle", "~> 0.5.0"
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- x-release-please-end -->
|
|
@@ -85,6 +85,28 @@ if page.next_page?
|
|
|
85
85
|
end
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
### File uploads
|
|
89
|
+
|
|
90
|
+
Request parameters that correspond to file uploads can be passed as raw contents, a [`Pathname`](https://rubyapi.org/3.2/o/pathname) instance, [`StringIO`](https://rubyapi.org/3.2/o/stringio), or more.
|
|
91
|
+
|
|
92
|
+
```ruby
|
|
93
|
+
require "pathname"
|
|
94
|
+
|
|
95
|
+
# Use `Pathname` to send the filename and/or avoid paging a large file into memory:
|
|
96
|
+
payout_v1 = straddle.payouts.upload_authorization_document(file: Pathname("/path/to/file"))
|
|
97
|
+
|
|
98
|
+
# Alternatively, pass file contents or a `StringIO` directly:
|
|
99
|
+
payout_v1 = straddle.payouts.upload_authorization_document(file: File.read("/path/to/file"))
|
|
100
|
+
|
|
101
|
+
# Or, to control the filename and/or content type:
|
|
102
|
+
File = Straddle::FilePart.new(File.read("/path/to/file"), filename: "/path/to/file", content_type: "…")
|
|
103
|
+
payout_v1 = straddle.payouts.upload_authorization_document(file: File)
|
|
104
|
+
|
|
105
|
+
puts(payout_v1.data)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Note that you can also pass a raw `IO` descriptor, but this disables retries, as the library can't be sure if the descriptor is a file or pipe (which cannot be rewound).
|
|
109
|
+
|
|
88
110
|
### Handling errors
|
|
89
111
|
|
|
90
112
|
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Straddle::Errors::APIError` will be thrown:
|
data/lib/straddle/client.rb
CHANGED
|
@@ -135,6 +135,19 @@ module Straddle
|
|
|
135
135
|
raise ArgumentError.new("api_key is required, and can be set via environ: \"STRADDLE_API_KEY\"")
|
|
136
136
|
end
|
|
137
137
|
|
|
138
|
+
headers = {}
|
|
139
|
+
custom_headers_env = ENV["STRADDLE_CUSTOM_HEADERS"]
|
|
140
|
+
unless custom_headers_env.nil?
|
|
141
|
+
parsed = {}
|
|
142
|
+
custom_headers_env.split("\n").each do |line|
|
|
143
|
+
colon = line.index(":")
|
|
144
|
+
unless colon.nil?
|
|
145
|
+
parsed[line[0...colon].strip] = line[(colon + 1)..].strip
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
headers = parsed.merge(headers)
|
|
149
|
+
end
|
|
150
|
+
|
|
138
151
|
@api_key = api_key.to_s
|
|
139
152
|
|
|
140
153
|
super(
|
|
@@ -142,7 +155,8 @@ module Straddle
|
|
|
142
155
|
timeout: timeout,
|
|
143
156
|
max_retries: max_retries,
|
|
144
157
|
initial_retry_delay: initial_retry_delay,
|
|
145
|
-
max_retry_delay: max_retry_delay
|
|
158
|
+
max_retry_delay: max_retry_delay,
|
|
159
|
+
headers: headers
|
|
146
160
|
)
|
|
147
161
|
|
|
148
162
|
@embed = Straddle::Resources::Embed.new(client: self)
|
|
@@ -306,6 +306,11 @@ module Straddle
|
|
|
306
306
|
Straddle::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
|
|
307
307
|
end
|
|
308
308
|
|
|
309
|
+
# Generated methods always pass `req[:body]` for operations that define a
|
|
310
|
+
# request body, so only elide the content-type header when the operation
|
|
311
|
+
# has no body at all, not when an optional body param was omitted.
|
|
312
|
+
headers.delete("content-type") if body.nil? && !req.key?(:body)
|
|
313
|
+
|
|
309
314
|
url = Straddle::Internal::Util.join_parsed_uri(
|
|
310
315
|
@base_url_components,
|
|
311
316
|
{**req, path: path, query: query}
|
|
@@ -157,7 +157,7 @@ module Straddle
|
|
|
157
157
|
in Hash | nil => coerced
|
|
158
158
|
coerced
|
|
159
159
|
else
|
|
160
|
-
message = "Expected a #{Hash} or #{Straddle::Internal::Type::BaseModel}, got #{
|
|
160
|
+
message = "Expected a #{Hash} or #{Straddle::Internal::Type::BaseModel}, got #{input.inspect}"
|
|
161
161
|
raise ArgumentError.new(message)
|
|
162
162
|
end
|
|
163
163
|
end
|
|
@@ -237,6 +237,11 @@ module Straddle
|
|
|
237
237
|
end
|
|
238
238
|
end
|
|
239
239
|
|
|
240
|
+
# @type [Regexp]
|
|
241
|
+
#
|
|
242
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
243
|
+
RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/
|
|
244
|
+
|
|
240
245
|
class << self
|
|
241
246
|
# @api private
|
|
242
247
|
#
|
|
@@ -247,6 +252,15 @@ module Straddle
|
|
|
247
252
|
"#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
|
|
248
253
|
end
|
|
249
254
|
|
|
255
|
+
# @api private
|
|
256
|
+
#
|
|
257
|
+
# @param path [String, Integer]
|
|
258
|
+
#
|
|
259
|
+
# @return [String]
|
|
260
|
+
def encode_path(path)
|
|
261
|
+
path.to_s.gsub(Straddle::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
|
|
262
|
+
end
|
|
263
|
+
|
|
250
264
|
# @api private
|
|
251
265
|
#
|
|
252
266
|
# @param path [String, Array<String>]
|
|
@@ -259,7 +273,7 @@ module Straddle
|
|
|
259
273
|
in []
|
|
260
274
|
""
|
|
261
275
|
in [String => p, *interpolations]
|
|
262
|
-
encoded = interpolations.map {
|
|
276
|
+
encoded = interpolations.map { encode_path(_1) }
|
|
263
277
|
format(p, *encoded)
|
|
264
278
|
end
|
|
265
279
|
end
|
|
@@ -571,16 +585,15 @@ module Straddle
|
|
|
571
585
|
y << "Content-Disposition: form-data"
|
|
572
586
|
|
|
573
587
|
unless key.nil?
|
|
574
|
-
|
|
575
|
-
y << "; name=\"#{name}\""
|
|
588
|
+
y << "; name=\"#{key}\""
|
|
576
589
|
end
|
|
577
590
|
|
|
578
591
|
case val
|
|
579
592
|
in Straddle::FilePart unless val.filename.nil?
|
|
580
|
-
filename =
|
|
593
|
+
filename = encode_path(val.filename)
|
|
581
594
|
y << "; filename=\"#{filename}\""
|
|
582
595
|
in Pathname | IO
|
|
583
|
-
filename =
|
|
596
|
+
filename = encode_path(::File.basename(val.to_path))
|
|
584
597
|
y << "; filename=\"#{filename}\""
|
|
585
598
|
else
|
|
586
599
|
end
|
|
@@ -597,6 +610,7 @@ module Straddle
|
|
|
597
610
|
#
|
|
598
611
|
# @return [Array(String, Enumerable<String>)]
|
|
599
612
|
private def encode_multipart_streaming(body)
|
|
613
|
+
# rubocop:disable Style/CaseEquality
|
|
600
614
|
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
|
|
601
615
|
boundary = SecureRandom.urlsafe_base64(46)
|
|
602
616
|
|
|
@@ -606,7 +620,7 @@ module Straddle
|
|
|
606
620
|
in Hash
|
|
607
621
|
body.each do |key, val|
|
|
608
622
|
case val
|
|
609
|
-
in Array if val.all? { primitive?(_1) }
|
|
623
|
+
in Array if val.all? { primitive?(_1) || Straddle::Internal::Type::FileInput === _1 }
|
|
610
624
|
val.each do |v|
|
|
611
625
|
write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
|
|
612
626
|
end
|
|
@@ -622,6 +636,7 @@ module Straddle
|
|
|
622
636
|
|
|
623
637
|
fused_io = fused_enum(strio) { closing.each(&:call) }
|
|
624
638
|
[boundary, fused_io]
|
|
639
|
+
# rubocop:enable Style/CaseEquality
|
|
625
640
|
end
|
|
626
641
|
|
|
627
642
|
# @api private
|
|
@@ -190,6 +190,8 @@ module Straddle
|
|
|
190
190
|
REVERSED_CUSTOMER_DISPUTE = :reversed_customer_dispute
|
|
191
191
|
FAILED_CLOSED_BANK_ACCOUNT = :failed_closed_bank_account
|
|
192
192
|
REVERSED_CLOSED_BANK_ACCOUNT = :reversed_closed_bank_account
|
|
193
|
+
FAILED_NOT_AUTHORIZED = :failed_not_authorized
|
|
194
|
+
REVERSED_NOT_AUTHORIZED = :reversed_not_authorized
|
|
193
195
|
|
|
194
196
|
# @!method self.values
|
|
195
197
|
# @return [Array<Symbol>]
|
|
@@ -100,6 +100,24 @@ module Straddle
|
|
|
100
100
|
# @return [Array<String>]
|
|
101
101
|
required :funding_ids, Straddle::Internal::Type::ArrayOf[String]
|
|
102
102
|
|
|
103
|
+
# @!attribute has_refund
|
|
104
|
+
# Has the charge been refunded by an associated payout.
|
|
105
|
+
#
|
|
106
|
+
# @return [Boolean]
|
|
107
|
+
required :has_refund, Straddle::Internal::Type::Boolean
|
|
108
|
+
|
|
109
|
+
# @!attribute has_resubmit
|
|
110
|
+
# Has the charge been resubmitted.
|
|
111
|
+
#
|
|
112
|
+
# @return [Boolean]
|
|
113
|
+
required :has_resubmit, Straddle::Internal::Type::Boolean
|
|
114
|
+
|
|
115
|
+
# @!attribute is_resubmit
|
|
116
|
+
# Is the charge a resubmit of an original charge.
|
|
117
|
+
#
|
|
118
|
+
# @return [Boolean]
|
|
119
|
+
required :is_resubmit, Straddle::Internal::Type::Boolean
|
|
120
|
+
|
|
103
121
|
# @!attribute paykey
|
|
104
122
|
# Paykey.
|
|
105
123
|
#
|
|
@@ -148,6 +166,15 @@ module Straddle
|
|
|
148
166
|
# @return [Straddle::Models::CustomerDetailsV1, nil]
|
|
149
167
|
optional :customer_details, -> { Straddle::CustomerDetailsV1 }
|
|
150
168
|
|
|
169
|
+
# @!attribute documents
|
|
170
|
+
# Documents uploaded for this charge (e.g. proof of authorization), in the order
|
|
171
|
+
# they were uploaded.
|
|
172
|
+
#
|
|
173
|
+
# @return [Array<Straddle::Models::ChargeUnmaskResponse::Data::Document>, nil]
|
|
174
|
+
optional :documents,
|
|
175
|
+
-> { Straddle::Internal::Type::ArrayOf[Straddle::Models::ChargeUnmaskResponse::Data::Document] },
|
|
176
|
+
nil?: true
|
|
177
|
+
|
|
151
178
|
# @!attribute effective_at
|
|
152
179
|
# Effective at.
|
|
153
180
|
#
|
|
@@ -180,12 +207,12 @@ module Straddle
|
|
|
180
207
|
# @!attribute related_payments
|
|
181
208
|
# Related payments.
|
|
182
209
|
#
|
|
183
|
-
# @return [
|
|
210
|
+
# @return [Array<Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment>, nil]
|
|
184
211
|
optional :related_payments,
|
|
185
|
-
-> { Straddle::Internal::Type::
|
|
212
|
+
-> { Straddle::Internal::Type::ArrayOf[Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment] },
|
|
186
213
|
nil?: true
|
|
187
214
|
|
|
188
|
-
# @!method initialize(id:, amount:, config:, consent_type:, created_at:, currency:, description:, device:, external_id:, funding_ids:, paykey:, payment_date:, status:, status_details:, status_history:, trace_ids:, updated_at:, customer_details: nil, effective_at: nil, metadata: nil, paykey_details: nil, payment_rail: nil, processed_at: nil, related_payments: nil)
|
|
215
|
+
# @!method initialize(id:, amount:, config:, consent_type:, created_at:, currency:, description:, device:, external_id:, funding_ids:, has_refund:, has_resubmit:, is_resubmit:, paykey:, payment_date:, status:, status_details:, status_history:, trace_ids:, updated_at:, customer_details: nil, documents: nil, effective_at: nil, metadata: nil, paykey_details: nil, payment_rail: nil, processed_at: nil, related_payments: nil)
|
|
189
216
|
# Some parameter documentations has been truncated, see
|
|
190
217
|
# {Straddle::Models::ChargeUnmaskResponse::Data} for more details.
|
|
191
218
|
#
|
|
@@ -209,6 +236,12 @@ module Straddle
|
|
|
209
236
|
#
|
|
210
237
|
# @param funding_ids [Array<String>] Funding Ids
|
|
211
238
|
#
|
|
239
|
+
# @param has_refund [Boolean] Has the charge been refunded by an associated payout.
|
|
240
|
+
#
|
|
241
|
+
# @param has_resubmit [Boolean] Has the charge been resubmitted.
|
|
242
|
+
#
|
|
243
|
+
# @param is_resubmit [Boolean] Is the charge a resubmit of an original charge.
|
|
244
|
+
#
|
|
212
245
|
# @param paykey [String] Paykey.
|
|
213
246
|
#
|
|
214
247
|
# @param payment_date [Date] Payment date.
|
|
@@ -225,6 +258,8 @@ module Straddle
|
|
|
225
258
|
#
|
|
226
259
|
# @param customer_details [Straddle::Models::CustomerDetailsV1] Information about the customer associated with the charge or payout.
|
|
227
260
|
#
|
|
261
|
+
# @param documents [Array<Straddle::Models::ChargeUnmaskResponse::Data::Document>, nil] Documents uploaded for this charge (e.g. proof of authorization), in the order t
|
|
262
|
+
#
|
|
228
263
|
# @param effective_at [Time, nil] Effective at.
|
|
229
264
|
#
|
|
230
265
|
# @param metadata [Hash{Symbol=>String}, nil] Metadata.
|
|
@@ -235,7 +270,7 @@ module Straddle
|
|
|
235
270
|
#
|
|
236
271
|
# @param processed_at [Time, nil] Processed at.
|
|
237
272
|
#
|
|
238
|
-
# @param related_payments [
|
|
273
|
+
# @param related_payments [Array<Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment>, nil] Related payments.
|
|
239
274
|
|
|
240
275
|
# @see Straddle::Models::ChargeUnmaskResponse::Data#config
|
|
241
276
|
class Config < Straddle::Internal::Type::BaseModel
|
|
@@ -304,6 +339,8 @@ module Straddle
|
|
|
304
339
|
REVERSED_CUSTOMER_DISPUTE = :reversed_customer_dispute
|
|
305
340
|
FAILED_CLOSED_BANK_ACCOUNT = :failed_closed_bank_account
|
|
306
341
|
REVERSED_CLOSED_BANK_ACCOUNT = :reversed_closed_bank_account
|
|
342
|
+
FAILED_NOT_AUTHORIZED = :failed_not_authorized
|
|
343
|
+
REVERSED_NOT_AUTHORIZED = :reversed_not_authorized
|
|
307
344
|
|
|
308
345
|
# @!method self.values
|
|
309
346
|
# @return [Array<Symbol>]
|
|
@@ -490,6 +527,58 @@ module Straddle
|
|
|
490
527
|
end
|
|
491
528
|
end
|
|
492
529
|
|
|
530
|
+
class Document < Straddle::Internal::Type::BaseModel
|
|
531
|
+
# @!attribute document_id
|
|
532
|
+
# Unique identifier for this document.
|
|
533
|
+
#
|
|
534
|
+
# @return [String]
|
|
535
|
+
required :document_id, String
|
|
536
|
+
|
|
537
|
+
# @!attribute document_name
|
|
538
|
+
# The file name of this document as uploaded.
|
|
539
|
+
#
|
|
540
|
+
# @return [String]
|
|
541
|
+
required :document_name, String
|
|
542
|
+
|
|
543
|
+
# @!attribute document_size
|
|
544
|
+
# The size of this document in bytes.
|
|
545
|
+
#
|
|
546
|
+
# @return [Integer]
|
|
547
|
+
required :document_size, Integer
|
|
548
|
+
|
|
549
|
+
# @!attribute document_type
|
|
550
|
+
#
|
|
551
|
+
# @return [Symbol, Straddle::Models::ChargeUnmaskResponse::Data::Document::DocumentType]
|
|
552
|
+
required :document_type, enum: -> { Straddle::Models::ChargeUnmaskResponse::Data::Document::DocumentType }
|
|
553
|
+
|
|
554
|
+
# @!attribute uploaded_at
|
|
555
|
+
# The UTC timestamp when this document was uploaded.
|
|
556
|
+
#
|
|
557
|
+
# @return [Time]
|
|
558
|
+
required :uploaded_at, Time
|
|
559
|
+
|
|
560
|
+
# @!method initialize(document_id:, document_name:, document_size:, document_type:, uploaded_at:)
|
|
561
|
+
# @param document_id [String] Unique identifier for this document.
|
|
562
|
+
#
|
|
563
|
+
# @param document_name [String] The file name of this document as uploaded.
|
|
564
|
+
#
|
|
565
|
+
# @param document_size [Integer] The size of this document in bytes.
|
|
566
|
+
#
|
|
567
|
+
# @param document_type [Symbol, Straddle::Models::ChargeUnmaskResponse::Data::Document::DocumentType]
|
|
568
|
+
#
|
|
569
|
+
# @param uploaded_at [Time] The UTC timestamp when this document was uploaded.
|
|
570
|
+
|
|
571
|
+
# @see Straddle::Models::ChargeUnmaskResponse::Data::Document#document_type
|
|
572
|
+
module DocumentType
|
|
573
|
+
extend Straddle::Internal::Type::Enum
|
|
574
|
+
|
|
575
|
+
PAYMENT_AUTHORIZATION = :payment_authorization
|
|
576
|
+
|
|
577
|
+
# @!method self.values
|
|
578
|
+
# @return [Array<Symbol>]
|
|
579
|
+
end
|
|
580
|
+
end
|
|
581
|
+
|
|
493
582
|
# The payment rail used for the charge or payout.
|
|
494
583
|
#
|
|
495
584
|
# @see Straddle::Models::ChargeUnmaskResponse::Data#payment_rail
|
|
@@ -502,15 +591,57 @@ module Straddle
|
|
|
502
591
|
# @return [Array<Symbol>]
|
|
503
592
|
end
|
|
504
593
|
|
|
505
|
-
|
|
506
|
-
|
|
594
|
+
class RelatedPayment < Straddle::Internal::Type::BaseModel
|
|
595
|
+
# @!attribute id
|
|
596
|
+
# The ID of the related payment.
|
|
597
|
+
#
|
|
598
|
+
# @return [String]
|
|
599
|
+
required :id, String
|
|
507
600
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
601
|
+
# @!attribute payment_type
|
|
602
|
+
# The type of payment.
|
|
603
|
+
#
|
|
604
|
+
# @return [Symbol, Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment::PaymentType]
|
|
605
|
+
required :payment_type,
|
|
606
|
+
enum: -> { Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment::PaymentType }
|
|
511
607
|
|
|
512
|
-
# @!
|
|
513
|
-
#
|
|
608
|
+
# @!attribute relationship
|
|
609
|
+
#
|
|
610
|
+
# @return [Symbol, Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment::Relationship]
|
|
611
|
+
required :relationship,
|
|
612
|
+
enum: -> { Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment::Relationship }
|
|
613
|
+
|
|
614
|
+
# @!method initialize(id:, payment_type:, relationship:)
|
|
615
|
+
# @param id [String] The ID of the related payment.
|
|
616
|
+
#
|
|
617
|
+
# @param payment_type [Symbol, Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment::PaymentType] The type of payment.
|
|
618
|
+
#
|
|
619
|
+
# @param relationship [Symbol, Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment::Relationship]
|
|
620
|
+
|
|
621
|
+
# The type of payment.
|
|
622
|
+
#
|
|
623
|
+
# @see Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment#payment_type
|
|
624
|
+
module PaymentType
|
|
625
|
+
extend Straddle::Internal::Type::Enum
|
|
626
|
+
|
|
627
|
+
CHARGE = :charge
|
|
628
|
+
PAYOUT = :payout
|
|
629
|
+
|
|
630
|
+
# @!method self.values
|
|
631
|
+
# @return [Array<Symbol>]
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
# @see Straddle::Models::ChargeUnmaskResponse::Data::RelatedPayment#relationship
|
|
635
|
+
module Relationship
|
|
636
|
+
extend Straddle::Internal::Type::Enum
|
|
637
|
+
|
|
638
|
+
ORIGINAL = :original
|
|
639
|
+
RESUBMIT = :resubmit
|
|
640
|
+
REFUND = :refund
|
|
641
|
+
|
|
642
|
+
# @!method self.values
|
|
643
|
+
# @return [Array<Symbol>]
|
|
644
|
+
end
|
|
514
645
|
end
|
|
515
646
|
end
|
|
516
647
|
|