whop_sdk 1.0.11 → 1.0.12
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6b9d224f549b7e16ee1bb5de5d10d1a50706dbd1b746be4c450feeb700a160d5
|
|
4
|
+
data.tar.gz: 3429efb80021dc870ba0bc4c9599c4ca97efa2e4ad9ddce312e54dc2124f340e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 687fe8d7db55950f6a70e20fcbd4778ceeb6187290c6fc37dda4611b0f367b0626ca3a4a58832a13383fceb8f42eb63b602e0f6387308d7be0f4ae3bc2a397ea
|
|
7
|
+
data.tar.gz: 8f378d3b28200bf60ab53e36581482a8b7f79d5eb9529c5b652a1a57213c52d33be85ec2f0dfadbdb5d93b83ba5ba8382434c364e9c94e74e4ed244163796966
|
data/.fernignore
CHANGED
|
@@ -38,7 +38,25 @@
|
|
|
38
38
|
# `require "whop_sdk"` — the gem stops loading for everyone, not just user-token callers.
|
|
39
39
|
# ci.yml asserts all three every run so a regeneration that drops any of them fails there
|
|
40
40
|
# instead of on a caller's machine.
|
|
41
|
+
#
|
|
42
|
+
# lib/whop_sdk/internal/iterators/cursor_page_iterator.rb is a patched copy of a generated
|
|
43
|
+
# file. The generated clients all pass cursor_field: :end_cursor, but the response models
|
|
44
|
+
# declare end_cursor on page_info rather than at the root and Internal::Types::Model has no
|
|
45
|
+
# method_missing — so the root lookup raised NoMethodError on the first page of every list
|
|
46
|
+
# in 1.0.11. The patch tries the root first and falls back to page_info, so it stays correct
|
|
47
|
+
# if the generator is fixed. Delete this entry and the file once fern-ruby-sdk emits the
|
|
48
|
+
# nested lookup itself.
|
|
49
|
+
#
|
|
50
|
+
# lib/whop_sdk/internal/types/utils.rb is a patched copy of a generated file. The Ruby
|
|
51
|
+
# generator maps every OpenAPI `number` to Integer — there is not one Float declaration in
|
|
52
|
+
# the gem, and `format: float` in the spec does not change it — so Utils.coerce's `value.to_i`
|
|
53
|
+
# silently truncated every decimal: initial_price 10.43 became 10, in both directions. The
|
|
54
|
+
# patch returns a Float unchanged when it has a fractional part, and still normalises whole
|
|
55
|
+
# floats to Integer so genuinely integral fields are unaffected. Delete this entry and the
|
|
56
|
+
# file once fern-ruby-sdk maps `number` to Float.
|
|
41
57
|
.github/workflows/ci.yml
|
|
42
58
|
.github/workflows/publish-main.yml
|
|
43
59
|
CHANGELOG.md
|
|
44
60
|
lib/whop_sdk/helpers
|
|
61
|
+
lib/whop_sdk/internal/iterators/cursor_page_iterator.rb
|
|
62
|
+
lib/whop_sdk/internal/types/utils.rb
|
|
@@ -35,7 +35,7 @@ module Whop_sdk
|
|
|
35
35
|
@default_headers = {
|
|
36
36
|
"X-Fern-Language": "Ruby",
|
|
37
37
|
"X-Fern-SDK-Name": "whop_sdk",
|
|
38
|
-
"X-Fern-SDK-Version": "1.0.
|
|
38
|
+
"X-Fern-SDK-Version": "1.0.12"
|
|
39
39
|
}.merge(headers)
|
|
40
40
|
@overridable_headers = overridable_headers.to_set { |name| name.to_s.downcase }
|
|
41
41
|
end
|
|
@@ -55,9 +55,25 @@ module Whop_sdk
|
|
|
55
55
|
else
|
|
56
56
|
fetched_page = result
|
|
57
57
|
end
|
|
58
|
-
@cursor = fetched_page
|
|
58
|
+
@cursor = extract_cursor(fetched_page)
|
|
59
59
|
fetched_page
|
|
60
60
|
end
|
|
61
|
+
|
|
62
|
+
private
|
|
63
|
+
|
|
64
|
+
# The generated clients pass cursor_field: :end_cursor, but the response models
|
|
65
|
+
# declare end_cursor on page_info rather than at the root, and Internal::Types::Model
|
|
66
|
+
# has no method_missing — so the root lookup raises NoMethodError on the first page of
|
|
67
|
+
# every list. Remove this file from .fernignore once fern-ruby-sdk emits the nested
|
|
68
|
+
# lookup itself.
|
|
69
|
+
def extract_cursor(page)
|
|
70
|
+
return page.send(@cursor_field) if page.respond_to?(@cursor_field)
|
|
71
|
+
|
|
72
|
+
page_info = page.respond_to?(:page_info) ? page.page_info : nil
|
|
73
|
+
return page_info.send(@cursor_field) if page_info.respond_to?(@cursor_field)
|
|
74
|
+
|
|
75
|
+
nil
|
|
76
|
+
end
|
|
61
77
|
end
|
|
62
78
|
end
|
|
63
79
|
end
|
data/lib/whop_sdk/version.rb
CHANGED