checkout-intents 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 +19 -0
- data/README.md +1 -1
- data/lib/checkout_intents/client.rb +4 -0
- data/lib/checkout_intents/models/billing_get_balance_params.rb +14 -0
- data/lib/checkout_intents/models/billing_get_balance_response.rb +16 -0
- data/lib/checkout_intents/models/billing_list_transactions_params.rb +38 -0
- data/lib/checkout_intents/models/billing_list_transactions_response.rb +45 -0
- data/lib/checkout_intents/models.rb +4 -0
- data/lib/checkout_intents/resources/billing.rb +59 -0
- data/lib/checkout_intents/version.rb +1 -1
- data/lib/checkout_intents.rb +5 -0
- data/rbi/checkout_intents/client.rbi +3 -0
- data/rbi/checkout_intents/models/billing_get_balance_params.rbi +32 -0
- data/rbi/checkout_intents/models/billing_get_balance_response.rbi +33 -0
- data/rbi/checkout_intents/models/billing_list_transactions_params.rbi +71 -0
- data/rbi/checkout_intents/models/billing_list_transactions_response.rbi +73 -0
- data/rbi/checkout_intents/models.rbi +5 -0
- data/rbi/checkout_intents/resources/billing.rbi +47 -0
- data/sig/checkout_intents/client.rbs +2 -0
- data/sig/checkout_intents/models/billing_get_balance_params.rbs +17 -0
- data/sig/checkout_intents/models/billing_get_balance_response.rbs +13 -0
- data/sig/checkout_intents/models/billing_list_transactions_params.rbs +38 -0
- data/sig/checkout_intents/models/billing_list_transactions_response.rbs +44 -0
- data/sig/checkout_intents/models.rbs +4 -0
- data/sig/checkout_intents/resources/billing.rbs +18 -0
- metadata +17 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a3f29eae5c36ce3698f14d3937df0e905c2b13e5e441d7a341a92c94f94b1ad
|
|
4
|
+
data.tar.gz: e44c0b71680d969454059637fc220ada8973b34d2530e7e2fe94fcb7b020d4a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc23414fd1a6c3a293031ddcd2c08cae568e7b93aa75fc1bbb5974f416826721773ae1deec118e6cb4896c7a1295f3c1bcaef7fddeef4b91cc7c479d3d9ab7bc
|
|
7
|
+
data.tar.gz: cadfab3129cc51bcdae252e4b1b73b26a95a43dbfae35cafe70118f18eb1b4b3c05f936fe4bc68ef04ded3afcfed00854e3e6d6a75afed8a6a7743178d1d91ad
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 (2026-02-27)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/rye-com/checkout-intents-ruby/compare/v0.4.0...v0.5.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Add hidden billing API endpoints for drawdown balance and transactions ([1d0cf2f](https://github.com/rye-com/checkout-intents-ruby/commit/1d0cf2ff495f773989a0db5ba645897d1663fcbb))
|
|
10
|
+
* proxy product images through Rye domain ([1c3a824](https://github.com/rye-com/checkout-intents-ruby/commit/1c3a82497f2ffd7deaf9b0df3ae6d9c6ebea796c))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **internal:** formatting ([48e805b](https://github.com/rye-com/checkout-intents-ruby/commit/48e805b256315431a15d0f37f4f1547c0ae8bcec))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Chores
|
|
19
|
+
|
|
20
|
+
* **internal:** improvements ([bf4bc16](https://github.com/rye-com/checkout-intents-ruby/commit/bf4bc16e17bc6f52eca011604bc4fff648c96b0e))
|
|
21
|
+
|
|
3
22
|
## 0.4.0 (2026-02-25)
|
|
4
23
|
|
|
5
24
|
Full Changelog: [v0.3.1...v0.4.0](https://github.com/rye-com/checkout-intents-ruby/compare/v0.3.1...v0.4.0)
|
data/README.md
CHANGED
|
@@ -36,6 +36,9 @@ module CheckoutIntents
|
|
|
36
36
|
# @return [::CheckoutIntents::Resources::Products]
|
|
37
37
|
attr_reader :products
|
|
38
38
|
|
|
39
|
+
# @return [::CheckoutIntents::Resources::Billing]
|
|
40
|
+
attr_reader :billing
|
|
41
|
+
|
|
39
42
|
# @api private
|
|
40
43
|
#
|
|
41
44
|
# @return [Hash{String=>String}]
|
|
@@ -132,6 +135,7 @@ module CheckoutIntents
|
|
|
132
135
|
@betas = ::CheckoutIntents::Resources::Betas.new(client: self)
|
|
133
136
|
@brands = ::CheckoutIntents::Resources::Brands.new(client: self)
|
|
134
137
|
@products = ::CheckoutIntents::Resources::Products.new(client: self)
|
|
138
|
+
@billing = ::CheckoutIntents::Resources::Billing.new(client: self)
|
|
135
139
|
end
|
|
136
140
|
end
|
|
137
141
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutIntents
|
|
4
|
+
module Models
|
|
5
|
+
# @see ::CheckoutIntents::Resources::Billing#get_balance
|
|
6
|
+
class BillingGetBalanceParams < ::CheckoutIntents::Internal::Type::BaseModel
|
|
7
|
+
extend ::CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ::CheckoutIntents::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [::CheckoutIntents::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutIntents
|
|
4
|
+
module Models
|
|
5
|
+
# @see ::CheckoutIntents::Resources::Billing#get_balance
|
|
6
|
+
class BillingGetBalanceResponse < ::CheckoutIntents::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute balance
|
|
8
|
+
#
|
|
9
|
+
# @return [::CheckoutIntents::Models::Money]
|
|
10
|
+
required :balance, -> { ::CheckoutIntents::Money }
|
|
11
|
+
|
|
12
|
+
# @!method initialize(balance:)
|
|
13
|
+
# @param balance [::CheckoutIntents::Models::Money]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutIntents
|
|
4
|
+
module Models
|
|
5
|
+
# @see ::CheckoutIntents::Resources::Billing#list_transactions
|
|
6
|
+
class BillingListTransactionsParams < ::CheckoutIntents::Internal::Type::BaseModel
|
|
7
|
+
extend ::CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ::CheckoutIntents::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute after
|
|
11
|
+
# Cursor for forward pagination (transaction ID to start after)
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :after, String
|
|
15
|
+
|
|
16
|
+
# @!attribute before
|
|
17
|
+
# Cursor for backward pagination (transaction ID to end before)
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :before, String
|
|
21
|
+
|
|
22
|
+
# @!attribute limit
|
|
23
|
+
# Maximum number of transactions to return (default 20)
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer, nil]
|
|
26
|
+
optional :limit, Integer
|
|
27
|
+
|
|
28
|
+
# @!method initialize(after: nil, before: nil, limit: nil, request_options: {})
|
|
29
|
+
# @param after [String] Cursor for forward pagination (transaction ID to start after)
|
|
30
|
+
#
|
|
31
|
+
# @param before [String] Cursor for backward pagination (transaction ID to end before)
|
|
32
|
+
#
|
|
33
|
+
# @param limit [Integer] Maximum number of transactions to return (default 20)
|
|
34
|
+
#
|
|
35
|
+
# @param request_options [::CheckoutIntents::RequestOptions, Hash{Symbol=>Object}]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutIntents
|
|
4
|
+
module Models
|
|
5
|
+
# @see ::CheckoutIntents::Resources::Billing#list_transactions
|
|
6
|
+
class BillingListTransactionsResponse < ::CheckoutIntents::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute amount
|
|
13
|
+
#
|
|
14
|
+
# @return [::CheckoutIntents::Models::Money]
|
|
15
|
+
required :amount, -> { ::CheckoutIntents::Money }
|
|
16
|
+
|
|
17
|
+
# @!attribute created_at
|
|
18
|
+
#
|
|
19
|
+
# @return [Time]
|
|
20
|
+
required :created_at, Time, api_name: :createdAt
|
|
21
|
+
|
|
22
|
+
# @!attribute description
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :description, String
|
|
26
|
+
|
|
27
|
+
# @!attribute metadata
|
|
28
|
+
# Construct a type with a set of properties K of type T
|
|
29
|
+
#
|
|
30
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
31
|
+
optional :metadata, ::CheckoutIntents::Internal::Type::HashOf[String]
|
|
32
|
+
|
|
33
|
+
# @!method initialize(id:, amount:, created_at:, description: nil, metadata: nil)
|
|
34
|
+
# @param id [String]
|
|
35
|
+
#
|
|
36
|
+
# @param amount [::CheckoutIntents::Models::Money]
|
|
37
|
+
#
|
|
38
|
+
# @param created_at [Time]
|
|
39
|
+
#
|
|
40
|
+
# @param description [String]
|
|
41
|
+
#
|
|
42
|
+
# @param metadata [Hash{Symbol=>String}] Construct a type with a set of properties K of type T
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -46,6 +46,10 @@ module CheckoutIntents
|
|
|
46
46
|
|
|
47
47
|
Betas = ::CheckoutIntents::Models::Betas
|
|
48
48
|
|
|
49
|
+
BillingGetBalanceParams = ::CheckoutIntents::Models::BillingGetBalanceParams
|
|
50
|
+
|
|
51
|
+
BillingListTransactionsParams = ::CheckoutIntents::Models::BillingListTransactionsParams
|
|
52
|
+
|
|
49
53
|
BrandRetrieveParams = ::CheckoutIntents::Models::BrandRetrieveParams
|
|
50
54
|
|
|
51
55
|
Buyer = ::CheckoutIntents::Models::Buyer
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutIntents
|
|
4
|
+
module Resources
|
|
5
|
+
class Billing
|
|
6
|
+
# Get current drawdown balance for the authenticated developer
|
|
7
|
+
#
|
|
8
|
+
# @overload get_balance(request_options: {})
|
|
9
|
+
#
|
|
10
|
+
# @param request_options [::CheckoutIntents::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
11
|
+
#
|
|
12
|
+
# @return [::CheckoutIntents::Models::BillingGetBalanceResponse]
|
|
13
|
+
#
|
|
14
|
+
# @see ::CheckoutIntents::Models::BillingGetBalanceParams
|
|
15
|
+
def get_balance(params = {})
|
|
16
|
+
@client.request(
|
|
17
|
+
method: :get,
|
|
18
|
+
path: "api/v1/billing/balance",
|
|
19
|
+
model: ::CheckoutIntents::Models::BillingGetBalanceResponse,
|
|
20
|
+
options: params[:request_options]
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# List drawdown balance transactions for the authenticated developer
|
|
25
|
+
#
|
|
26
|
+
# @overload list_transactions(after: nil, before: nil, limit: nil, request_options: {})
|
|
27
|
+
#
|
|
28
|
+
# @param after [String] Cursor for forward pagination (transaction ID to start after)
|
|
29
|
+
#
|
|
30
|
+
# @param before [String] Cursor for backward pagination (transaction ID to end before)
|
|
31
|
+
#
|
|
32
|
+
# @param limit [Integer] Maximum number of transactions to return (default 20)
|
|
33
|
+
#
|
|
34
|
+
# @param request_options [::CheckoutIntents::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
35
|
+
#
|
|
36
|
+
# @return [::CheckoutIntents::Internal::CursorPagination<::CheckoutIntents::Models::BillingListTransactionsResponse>]
|
|
37
|
+
#
|
|
38
|
+
# @see ::CheckoutIntents::Models::BillingListTransactionsParams
|
|
39
|
+
def list_transactions(params = {})
|
|
40
|
+
parsed, options = ::CheckoutIntents::BillingListTransactionsParams.dump_request(params)
|
|
41
|
+
@client.request(
|
|
42
|
+
method: :get,
|
|
43
|
+
path: "api/v1/billing/transactions",
|
|
44
|
+
query: parsed,
|
|
45
|
+
page: ::CheckoutIntents::Internal::CursorPagination,
|
|
46
|
+
model: ::CheckoutIntents::Models::BillingListTransactionsResponse,
|
|
47
|
+
options: options
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# @api private
|
|
52
|
+
#
|
|
53
|
+
# @param client [::CheckoutIntents::Client]
|
|
54
|
+
def initialize(client:)
|
|
55
|
+
@client = client
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
data/lib/checkout_intents.rb
CHANGED
|
@@ -55,6 +55,10 @@ require_relative "checkout_intents/client"
|
|
|
55
55
|
require_relative "checkout_intents/internal/cursor_pagination"
|
|
56
56
|
require_relative "checkout_intents/models/base_checkout_intent"
|
|
57
57
|
require_relative "checkout_intents/models/betas/checkout_session_create_params"
|
|
58
|
+
require_relative "checkout_intents/models/billing_get_balance_params"
|
|
59
|
+
require_relative "checkout_intents/models/billing_get_balance_response"
|
|
60
|
+
require_relative "checkout_intents/models/billing_list_transactions_params"
|
|
61
|
+
require_relative "checkout_intents/models/billing_list_transactions_response"
|
|
58
62
|
require_relative "checkout_intents/models/brand_retrieve_params"
|
|
59
63
|
require_relative "checkout_intents/models/brand_retrieve_response"
|
|
60
64
|
require_relative "checkout_intents/models/buyer"
|
|
@@ -78,6 +82,7 @@ require_relative "checkout_intents/models"
|
|
|
78
82
|
require_relative "checkout_intents/helpers/polling"
|
|
79
83
|
require_relative "checkout_intents/resources/betas"
|
|
80
84
|
require_relative "checkout_intents/resources/betas/checkout_sessions"
|
|
85
|
+
require_relative "checkout_intents/resources/billing"
|
|
81
86
|
require_relative "checkout_intents/resources/brands"
|
|
82
87
|
require_relative "checkout_intents/resources/checkout_intents"
|
|
83
88
|
require_relative "checkout_intents/resources/products"
|
|
@@ -35,6 +35,9 @@ module CheckoutIntents
|
|
|
35
35
|
sig { returns(::CheckoutIntents::Resources::Products) }
|
|
36
36
|
attr_reader :products
|
|
37
37
|
|
|
38
|
+
sig { returns(::CheckoutIntents::Resources::Billing) }
|
|
39
|
+
attr_reader :billing
|
|
40
|
+
|
|
38
41
|
# @api private
|
|
39
42
|
sig { override.returns(T::Hash[String, String]) }
|
|
40
43
|
private def auth_headers
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module CheckoutIntents
|
|
4
|
+
module Models
|
|
5
|
+
class BillingGetBalanceParams < ::CheckoutIntents::Internal::Type::BaseModel
|
|
6
|
+
extend ::CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include ::CheckoutIntents::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
::CheckoutIntents::BillingGetBalanceParams,
|
|
13
|
+
::CheckoutIntents::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
request_options: ::CheckoutIntents::RequestOptions::OrHash
|
|
20
|
+
).returns(T.attached_class)
|
|
21
|
+
end
|
|
22
|
+
def self.new(request_options: {})
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
override.returns({ request_options: ::CheckoutIntents::RequestOptions })
|
|
27
|
+
end
|
|
28
|
+
def to_hash
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module CheckoutIntents
|
|
4
|
+
module Models
|
|
5
|
+
class BillingGetBalanceResponse < ::CheckoutIntents::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
::CheckoutIntents::Models::BillingGetBalanceResponse,
|
|
10
|
+
::CheckoutIntents::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(::CheckoutIntents::Money) }
|
|
15
|
+
attr_reader :balance
|
|
16
|
+
|
|
17
|
+
sig { params(balance: ::CheckoutIntents::Money::OrHash).void }
|
|
18
|
+
attr_writer :balance
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(balance: ::CheckoutIntents::Money::OrHash).returns(
|
|
22
|
+
T.attached_class
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
def self.new(balance:)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
sig { override.returns({ balance: ::CheckoutIntents::Money }) }
|
|
29
|
+
def to_hash
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module CheckoutIntents
|
|
4
|
+
module Models
|
|
5
|
+
class BillingListTransactionsParams < ::CheckoutIntents::Internal::Type::BaseModel
|
|
6
|
+
extend ::CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include ::CheckoutIntents::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
::CheckoutIntents::BillingListTransactionsParams,
|
|
13
|
+
::CheckoutIntents::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Cursor for forward pagination (transaction ID to start after)
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :after
|
|
20
|
+
|
|
21
|
+
sig { params(after: String).void }
|
|
22
|
+
attr_writer :after
|
|
23
|
+
|
|
24
|
+
# Cursor for backward pagination (transaction ID to end before)
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_reader :before
|
|
27
|
+
|
|
28
|
+
sig { params(before: String).void }
|
|
29
|
+
attr_writer :before
|
|
30
|
+
|
|
31
|
+
# Maximum number of transactions to return (default 20)
|
|
32
|
+
sig { returns(T.nilable(Integer)) }
|
|
33
|
+
attr_reader :limit
|
|
34
|
+
|
|
35
|
+
sig { params(limit: Integer).void }
|
|
36
|
+
attr_writer :limit
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
after: String,
|
|
41
|
+
before: String,
|
|
42
|
+
limit: Integer,
|
|
43
|
+
request_options: ::CheckoutIntents::RequestOptions::OrHash
|
|
44
|
+
).returns(T.attached_class)
|
|
45
|
+
end
|
|
46
|
+
def self.new(
|
|
47
|
+
# Cursor for forward pagination (transaction ID to start after)
|
|
48
|
+
after: nil,
|
|
49
|
+
# Cursor for backward pagination (transaction ID to end before)
|
|
50
|
+
before: nil,
|
|
51
|
+
# Maximum number of transactions to return (default 20)
|
|
52
|
+
limit: nil,
|
|
53
|
+
request_options: {}
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
override.returns(
|
|
59
|
+
{
|
|
60
|
+
after: String,
|
|
61
|
+
before: String,
|
|
62
|
+
limit: Integer,
|
|
63
|
+
request_options: ::CheckoutIntents::RequestOptions
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
def to_hash
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module CheckoutIntents
|
|
4
|
+
module Models
|
|
5
|
+
class BillingListTransactionsResponse < ::CheckoutIntents::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
::CheckoutIntents::Models::BillingListTransactionsResponse,
|
|
10
|
+
::CheckoutIntents::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
sig { returns(::CheckoutIntents::Money) }
|
|
18
|
+
attr_reader :amount
|
|
19
|
+
|
|
20
|
+
sig { params(amount: ::CheckoutIntents::Money::OrHash).void }
|
|
21
|
+
attr_writer :amount
|
|
22
|
+
|
|
23
|
+
sig { returns(Time) }
|
|
24
|
+
attr_accessor :created_at
|
|
25
|
+
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :description
|
|
28
|
+
|
|
29
|
+
sig { params(description: String).void }
|
|
30
|
+
attr_writer :description
|
|
31
|
+
|
|
32
|
+
# Construct a type with a set of properties K of type T
|
|
33
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
34
|
+
attr_reader :metadata
|
|
35
|
+
|
|
36
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
37
|
+
attr_writer :metadata
|
|
38
|
+
|
|
39
|
+
sig do
|
|
40
|
+
params(
|
|
41
|
+
id: String,
|
|
42
|
+
amount: ::CheckoutIntents::Money::OrHash,
|
|
43
|
+
created_at: Time,
|
|
44
|
+
description: String,
|
|
45
|
+
metadata: T::Hash[Symbol, String]
|
|
46
|
+
).returns(T.attached_class)
|
|
47
|
+
end
|
|
48
|
+
def self.new(
|
|
49
|
+
id:,
|
|
50
|
+
amount:,
|
|
51
|
+
created_at:,
|
|
52
|
+
description: nil,
|
|
53
|
+
# Construct a type with a set of properties K of type T
|
|
54
|
+
metadata: nil
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
sig do
|
|
59
|
+
override.returns(
|
|
60
|
+
{
|
|
61
|
+
id: String,
|
|
62
|
+
amount: ::CheckoutIntents::Money,
|
|
63
|
+
created_at: Time,
|
|
64
|
+
description: String,
|
|
65
|
+
metadata: T::Hash[Symbol, String]
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
def to_hash
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -5,6 +5,11 @@ module CheckoutIntents
|
|
|
5
5
|
|
|
6
6
|
Betas = ::CheckoutIntents::Models::Betas
|
|
7
7
|
|
|
8
|
+
BillingGetBalanceParams = ::CheckoutIntents::Models::BillingGetBalanceParams
|
|
9
|
+
|
|
10
|
+
BillingListTransactionsParams =
|
|
11
|
+
::CheckoutIntents::Models::BillingListTransactionsParams
|
|
12
|
+
|
|
8
13
|
BrandRetrieveParams = ::CheckoutIntents::Models::BrandRetrieveParams
|
|
9
14
|
|
|
10
15
|
Buyer = ::CheckoutIntents::Models::Buyer
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module CheckoutIntents
|
|
4
|
+
module Resources
|
|
5
|
+
class Billing
|
|
6
|
+
# Get current drawdown balance for the authenticated developer
|
|
7
|
+
sig do
|
|
8
|
+
params(
|
|
9
|
+
request_options: ::CheckoutIntents::RequestOptions::OrHash
|
|
10
|
+
).returns(::CheckoutIntents::Models::BillingGetBalanceResponse)
|
|
11
|
+
end
|
|
12
|
+
def get_balance(request_options: {})
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# List drawdown balance transactions for the authenticated developer
|
|
16
|
+
sig do
|
|
17
|
+
params(
|
|
18
|
+
after: String,
|
|
19
|
+
before: String,
|
|
20
|
+
limit: Integer,
|
|
21
|
+
request_options: ::CheckoutIntents::RequestOptions::OrHash
|
|
22
|
+
).returns(
|
|
23
|
+
::CheckoutIntents::Internal::CursorPagination[
|
|
24
|
+
::CheckoutIntents::Models::BillingListTransactionsResponse
|
|
25
|
+
]
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
def list_transactions(
|
|
29
|
+
# Cursor for forward pagination (transaction ID to start after)
|
|
30
|
+
after: nil,
|
|
31
|
+
# Cursor for backward pagination (transaction ID to end before)
|
|
32
|
+
before: nil,
|
|
33
|
+
# Maximum number of transactions to return (default 20)
|
|
34
|
+
limit: nil,
|
|
35
|
+
request_options: {}
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @api private
|
|
40
|
+
sig do
|
|
41
|
+
params(client: ::CheckoutIntents::Client).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(client:)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type billing_get_balance_params =
|
|
4
|
+
{ } & ::CheckoutIntents::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class BillingGetBalanceParams < ::CheckoutIntents::Internal::Type::BaseModel
|
|
7
|
+
extend ::CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ::CheckoutIntents::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
def initialize: (
|
|
11
|
+
?request_options: ::CheckoutIntents::request_opts
|
|
12
|
+
) -> void
|
|
13
|
+
|
|
14
|
+
def to_hash: -> { request_options: ::CheckoutIntents::RequestOptions }
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type billing_get_balance_response = { balance: ::CheckoutIntents::Money }
|
|
4
|
+
|
|
5
|
+
class BillingGetBalanceResponse < ::CheckoutIntents::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor balance: ::CheckoutIntents::Money
|
|
7
|
+
|
|
8
|
+
def initialize: (balance: ::CheckoutIntents::Money) -> void
|
|
9
|
+
|
|
10
|
+
def to_hash: -> { balance: ::CheckoutIntents::Money }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type billing_list_transactions_params =
|
|
4
|
+
{ after: String, before: String, limit: Integer }
|
|
5
|
+
& ::CheckoutIntents::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class BillingListTransactionsParams < ::CheckoutIntents::Internal::Type::BaseModel
|
|
8
|
+
extend ::CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include ::CheckoutIntents::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_reader after: String?
|
|
12
|
+
|
|
13
|
+
def after=: (String) -> String
|
|
14
|
+
|
|
15
|
+
attr_reader before: String?
|
|
16
|
+
|
|
17
|
+
def before=: (String) -> String
|
|
18
|
+
|
|
19
|
+
attr_reader limit: Integer?
|
|
20
|
+
|
|
21
|
+
def limit=: (Integer) -> Integer
|
|
22
|
+
|
|
23
|
+
def initialize: (
|
|
24
|
+
?after: String,
|
|
25
|
+
?before: String,
|
|
26
|
+
?limit: Integer,
|
|
27
|
+
?request_options: ::CheckoutIntents::request_opts
|
|
28
|
+
) -> void
|
|
29
|
+
|
|
30
|
+
def to_hash: -> {
|
|
31
|
+
after: String,
|
|
32
|
+
before: String,
|
|
33
|
+
limit: Integer,
|
|
34
|
+
request_options: ::CheckoutIntents::RequestOptions
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type billing_list_transactions_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
amount: ::CheckoutIntents::Money,
|
|
7
|
+
created_at: Time,
|
|
8
|
+
description: String,
|
|
9
|
+
metadata: ::Hash[Symbol, String]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class BillingListTransactionsResponse < ::CheckoutIntents::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor id: String
|
|
14
|
+
|
|
15
|
+
attr_accessor amount: ::CheckoutIntents::Money
|
|
16
|
+
|
|
17
|
+
attr_accessor created_at: Time
|
|
18
|
+
|
|
19
|
+
attr_reader description: String?
|
|
20
|
+
|
|
21
|
+
def description=: (String) -> String
|
|
22
|
+
|
|
23
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
24
|
+
|
|
25
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
26
|
+
|
|
27
|
+
def initialize: (
|
|
28
|
+
id: String,
|
|
29
|
+
amount: ::CheckoutIntents::Money,
|
|
30
|
+
created_at: Time,
|
|
31
|
+
?description: String,
|
|
32
|
+
?metadata: ::Hash[Symbol, String]
|
|
33
|
+
) -> void
|
|
34
|
+
|
|
35
|
+
def to_hash: -> {
|
|
36
|
+
id: String,
|
|
37
|
+
amount: ::CheckoutIntents::Money,
|
|
38
|
+
created_at: Time,
|
|
39
|
+
description: String,
|
|
40
|
+
metadata: ::Hash[Symbol, String]
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -3,6 +3,10 @@ module CheckoutIntents
|
|
|
3
3
|
|
|
4
4
|
module Betas = ::CheckoutIntents::Models::Betas
|
|
5
5
|
|
|
6
|
+
class BillingGetBalanceParams = ::CheckoutIntents::Models::BillingGetBalanceParams
|
|
7
|
+
|
|
8
|
+
class BillingListTransactionsParams = ::CheckoutIntents::Models::BillingListTransactionsParams
|
|
9
|
+
|
|
6
10
|
class BrandRetrieveParams = ::CheckoutIntents::Models::BrandRetrieveParams
|
|
7
11
|
|
|
8
12
|
class Buyer = ::CheckoutIntents::Models::Buyer
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Resources
|
|
3
|
+
class Billing
|
|
4
|
+
def get_balance: (
|
|
5
|
+
?request_options: ::CheckoutIntents::request_opts
|
|
6
|
+
) -> ::CheckoutIntents::Models::BillingGetBalanceResponse
|
|
7
|
+
|
|
8
|
+
def list_transactions: (
|
|
9
|
+
?after: String,
|
|
10
|
+
?before: String,
|
|
11
|
+
?limit: Integer,
|
|
12
|
+
?request_options: ::CheckoutIntents::request_opts
|
|
13
|
+
) -> ::CheckoutIntents::Internal::CursorPagination[::CheckoutIntents::Models::BillingListTransactionsResponse]
|
|
14
|
+
|
|
15
|
+
def initialize: (client: ::CheckoutIntents::Client) -> void
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: checkout-intents
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Checkout Intents
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -73,6 +73,10 @@ files:
|
|
|
73
73
|
- lib/checkout_intents/models.rb
|
|
74
74
|
- lib/checkout_intents/models/base_checkout_intent.rb
|
|
75
75
|
- lib/checkout_intents/models/betas/checkout_session_create_params.rb
|
|
76
|
+
- lib/checkout_intents/models/billing_get_balance_params.rb
|
|
77
|
+
- lib/checkout_intents/models/billing_get_balance_response.rb
|
|
78
|
+
- lib/checkout_intents/models/billing_list_transactions_params.rb
|
|
79
|
+
- lib/checkout_intents/models/billing_list_transactions_response.rb
|
|
76
80
|
- lib/checkout_intents/models/brand_retrieve_params.rb
|
|
77
81
|
- lib/checkout_intents/models/brand_retrieve_response.rb
|
|
78
82
|
- lib/checkout_intents/models/buyer.rb
|
|
@@ -95,6 +99,7 @@ files:
|
|
|
95
99
|
- lib/checkout_intents/request_options.rb
|
|
96
100
|
- lib/checkout_intents/resources/betas.rb
|
|
97
101
|
- lib/checkout_intents/resources/betas/checkout_sessions.rb
|
|
102
|
+
- lib/checkout_intents/resources/billing.rb
|
|
98
103
|
- lib/checkout_intents/resources/brands.rb
|
|
99
104
|
- lib/checkout_intents/resources/checkout_intents.rb
|
|
100
105
|
- lib/checkout_intents/resources/products.rb
|
|
@@ -123,6 +128,10 @@ files:
|
|
|
123
128
|
- rbi/checkout_intents/models.rbi
|
|
124
129
|
- rbi/checkout_intents/models/base_checkout_intent.rbi
|
|
125
130
|
- rbi/checkout_intents/models/betas/checkout_session_create_params.rbi
|
|
131
|
+
- rbi/checkout_intents/models/billing_get_balance_params.rbi
|
|
132
|
+
- rbi/checkout_intents/models/billing_get_balance_response.rbi
|
|
133
|
+
- rbi/checkout_intents/models/billing_list_transactions_params.rbi
|
|
134
|
+
- rbi/checkout_intents/models/billing_list_transactions_response.rbi
|
|
126
135
|
- rbi/checkout_intents/models/brand_retrieve_params.rbi
|
|
127
136
|
- rbi/checkout_intents/models/brand_retrieve_response.rbi
|
|
128
137
|
- rbi/checkout_intents/models/buyer.rbi
|
|
@@ -145,6 +154,7 @@ files:
|
|
|
145
154
|
- rbi/checkout_intents/request_options.rbi
|
|
146
155
|
- rbi/checkout_intents/resources/betas.rbi
|
|
147
156
|
- rbi/checkout_intents/resources/betas/checkout_sessions.rbi
|
|
157
|
+
- rbi/checkout_intents/resources/billing.rbi
|
|
148
158
|
- rbi/checkout_intents/resources/brands.rbi
|
|
149
159
|
- rbi/checkout_intents/resources/checkout_intents.rbi
|
|
150
160
|
- rbi/checkout_intents/resources/products.rbi
|
|
@@ -172,6 +182,10 @@ files:
|
|
|
172
182
|
- sig/checkout_intents/models.rbs
|
|
173
183
|
- sig/checkout_intents/models/base_checkout_intent.rbs
|
|
174
184
|
- sig/checkout_intents/models/betas/checkout_session_create_params.rbs
|
|
185
|
+
- sig/checkout_intents/models/billing_get_balance_params.rbs
|
|
186
|
+
- sig/checkout_intents/models/billing_get_balance_response.rbs
|
|
187
|
+
- sig/checkout_intents/models/billing_list_transactions_params.rbs
|
|
188
|
+
- sig/checkout_intents/models/billing_list_transactions_response.rbs
|
|
175
189
|
- sig/checkout_intents/models/brand_retrieve_params.rbs
|
|
176
190
|
- sig/checkout_intents/models/brand_retrieve_response.rbs
|
|
177
191
|
- sig/checkout_intents/models/buyer.rbs
|
|
@@ -194,6 +208,7 @@ files:
|
|
|
194
208
|
- sig/checkout_intents/request_options.rbs
|
|
195
209
|
- sig/checkout_intents/resources/betas.rbs
|
|
196
210
|
- sig/checkout_intents/resources/betas/checkout_sessions.rbs
|
|
211
|
+
- sig/checkout_intents/resources/billing.rbs
|
|
197
212
|
- sig/checkout_intents/resources/brands.rbs
|
|
198
213
|
- sig/checkout_intents/resources/checkout_intents.rbs
|
|
199
214
|
- sig/checkout_intents/resources/products.rbs
|