dodopayments 2.3.0 → 2.4.1
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 +17 -0
- data/README.md +1 -1
- data/lib/dodopayments/client.rb +0 -8
- data/lib/dodopayments/internal/util.rb +1 -2
- data/lib/dodopayments/models/customer_delete_payment_method_params.rb +26 -0
- data/lib/dodopayments/models/dispute.rb +9 -1
- data/lib/dodopayments/models/dispute_list_response.rb +9 -1
- data/lib/dodopayments/models/get_dispute.rb +9 -1
- data/lib/dodopayments/models.rb +2 -18
- data/lib/dodopayments/resources/customers.rb +25 -0
- data/lib/dodopayments/resources/invoices/payments.rb +0 -18
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +4 -29
- data/rbi/dodopayments/client.rbi +0 -6
- data/rbi/dodopayments/models/credit_entitlement_cart_response.rbi +4 -4
- data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +2 -2
- data/rbi/dodopayments/models/{your_webhook_url_create_params.rbi → customer_delete_payment_method_params.rbi} +9 -19
- data/rbi/dodopayments/models/dispute.rbi +12 -4
- data/rbi/dodopayments/models/dispute_list_response.rbi +11 -3
- data/rbi/dodopayments/models/get_dispute.rbi +12 -4
- data/rbi/dodopayments/models/license_key.rbi +2 -2
- data/rbi/dodopayments/models/meter_cart_response_item.rbi +2 -2
- data/rbi/dodopayments/models/payment.rbi +12 -10
- data/rbi/dodopayments/models/refund.rbi +4 -4
- data/rbi/dodopayments/models/refund_list_item.rbi +4 -4
- data/rbi/dodopayments/models/subscription.rbi +10 -8
- data/rbi/dodopayments/models.rbi +3 -25
- data/rbi/dodopayments/resources/customers.rbi +16 -0
- data/rbi/dodopayments/resources/invoices/payments.rbi +0 -9
- data/sig/dodopayments/client.rbs +0 -4
- data/sig/dodopayments/models/{product_collection_update_images_params.rbs → customer_delete_payment_method_params.rbs} +9 -9
- data/sig/dodopayments/models/dispute.rbs +5 -0
- data/sig/dodopayments/models/dispute_list_response.rbs +8 -3
- data/sig/dodopayments/models/get_dispute.rbs +5 -0
- data/sig/dodopayments/models.rbs +2 -18
- data/sig/dodopayments/resources/customers.rbs +6 -0
- data/sig/dodopayments/resources/invoices/payments.rbs +0 -5
- metadata +5 -80
- data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +0 -22
- data/lib/dodopayments/models/product_collection_create_params.rb +0 -98
- data/lib/dodopayments/models/product_collection_create_response.rb +0 -226
- data/lib/dodopayments/models/product_collection_delete_params.rb +0 -20
- data/lib/dodopayments/models/product_collection_list_params.rb +0 -46
- data/lib/dodopayments/models/product_collection_list_response.rb +0 -65
- data/lib/dodopayments/models/product_collection_retrieve_params.rb +0 -20
- data/lib/dodopayments/models/product_collection_retrieve_response.rb +0 -226
- data/lib/dodopayments/models/product_collection_unarchive_params.rb +0 -20
- data/lib/dodopayments/models/product_collection_unarchive_response.rb +0 -33
- data/lib/dodopayments/models/product_collection_update_images_params.rb +0 -29
- data/lib/dodopayments/models/product_collection_update_images_response.rb +0 -25
- data/lib/dodopayments/models/product_collection_update_params.rb +0 -61
- data/lib/dodopayments/models/product_collections/group_create_params.rb +0 -71
- data/lib/dodopayments/models/product_collections/group_create_response.rb +0 -160
- data/lib/dodopayments/models/product_collections/group_delete_params.rb +0 -28
- data/lib/dodopayments/models/product_collections/group_update_params.rb +0 -59
- data/lib/dodopayments/models/product_collections/groups/item_create_params.rb +0 -60
- data/lib/dodopayments/models/product_collections/groups/item_create_response.rb +0 -136
- data/lib/dodopayments/models/product_collections/groups/item_delete_params.rb +0 -36
- data/lib/dodopayments/models/product_collections/groups/item_update_params.rb +0 -47
- data/lib/dodopayments/models/your_webhook_url_create_params.rb +0 -32
- data/lib/dodopayments/resources/product_collections/groups/items.rb +0 -111
- data/lib/dodopayments/resources/product_collections/groups.rb +0 -109
- data/lib/dodopayments/resources/product_collections.rb +0 -179
- data/lib/dodopayments/resources/your_webhook_url.rb +0 -56
- data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +0 -40
- data/rbi/dodopayments/models/product_collection_create_params.rbi +0 -180
- data/rbi/dodopayments/models/product_collection_create_response.rbi +0 -303
- data/rbi/dodopayments/models/product_collection_delete_params.rbi +0 -38
- data/rbi/dodopayments/models/product_collection_list_params.rbi +0 -82
- data/rbi/dodopayments/models/product_collection_list_response.rbi +0 -88
- data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +0 -38
- data/rbi/dodopayments/models/product_collection_retrieve_response.rbi +0 -305
- data/rbi/dodopayments/models/product_collection_unarchive_params.rbi +0 -38
- data/rbi/dodopayments/models/product_collection_unarchive_response.rbi +0 -56
- data/rbi/dodopayments/models/product_collection_update_images_params.rbi +0 -52
- data/rbi/dodopayments/models/product_collection_update_images_response.rbi +0 -40
- data/rbi/dodopayments/models/product_collection_update_params.rbi +0 -84
- data/rbi/dodopayments/models/product_collections/group_create_params.rbi +0 -123
- data/rbi/dodopayments/models/product_collections/group_create_response.rbi +0 -204
- data/rbi/dodopayments/models/product_collections/group_delete_params.rbi +0 -48
- data/rbi/dodopayments/models/product_collections/group_update_params.rbi +0 -80
- data/rbi/dodopayments/models/product_collections/groups/item_create_params.rbi +0 -113
- data/rbi/dodopayments/models/product_collections/groups/item_create_response.rbi +0 -156
- data/rbi/dodopayments/models/product_collections/groups/item_delete_params.rbi +0 -55
- data/rbi/dodopayments/models/product_collections/groups/item_update_params.rbi +0 -68
- data/rbi/dodopayments/resources/product_collections/groups/items.rbi +0 -83
- data/rbi/dodopayments/resources/product_collections/groups.rbi +0 -90
- data/rbi/dodopayments/resources/product_collections.rbi +0 -149
- data/rbi/dodopayments/resources/your_webhook_url.rbi +0 -53
- data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +0 -25
- data/sig/dodopayments/models/product_collection_create_params.rbs +0 -80
- data/sig/dodopayments/models/product_collection_create_response.rbs +0 -179
- data/sig/dodopayments/models/product_collection_delete_params.rbs +0 -23
- data/sig/dodopayments/models/product_collection_list_params.rbs +0 -49
- data/sig/dodopayments/models/product_collection_list_response.rbs +0 -50
- data/sig/dodopayments/models/product_collection_retrieve_params.rbs +0 -23
- data/sig/dodopayments/models/product_collection_retrieve_response.rbs +0 -179
- data/sig/dodopayments/models/product_collection_unarchive_params.rbs +0 -23
- data/sig/dodopayments/models/product_collection_unarchive_response.rbs +0 -30
- data/sig/dodopayments/models/product_collection_update_images_response.rbs +0 -16
- data/sig/dodopayments/models/product_collection_update_params.rbs +0 -51
- data/sig/dodopayments/models/product_collections/group_create_params.rbs +0 -55
- data/sig/dodopayments/models/product_collections/group_create_response.rbs +0 -129
- data/sig/dodopayments/models/product_collections/group_delete_params.rbs +0 -30
- data/sig/dodopayments/models/product_collections/group_update_params.rbs +0 -48
- data/sig/dodopayments/models/product_collections/groups/item_create_params.rbs +0 -52
- data/sig/dodopayments/models/product_collections/groups/item_create_response.rbs +0 -104
- data/sig/dodopayments/models/product_collections/groups/item_delete_params.rbs +0 -36
- data/sig/dodopayments/models/product_collections/groups/item_update_params.rbs +0 -40
- data/sig/dodopayments/models/your_webhook_url_create_params.rbs +0 -42
- data/sig/dodopayments/resources/product_collections/groups/items.rbs +0 -33
- data/sig/dodopayments/resources/product_collections/groups.rbs +0 -34
- data/sig/dodopayments/resources/product_collections.rbs +0 -56
- data/sig/dodopayments/resources/your_webhook_url.rbs +0 -18
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
module ProductCollections
|
|
6
|
-
# @see Dodopayments::Resources::ProductCollections::Groups#create
|
|
7
|
-
class GroupCreateResponse < Dodopayments::Internal::Type::BaseModel
|
|
8
|
-
# @!attribute group_id
|
|
9
|
-
#
|
|
10
|
-
# @return [String]
|
|
11
|
-
required :group_id, String
|
|
12
|
-
|
|
13
|
-
# @!attribute products
|
|
14
|
-
#
|
|
15
|
-
# @return [Array<Dodopayments::Models::ProductCollections::GroupCreateResponse::Product>]
|
|
16
|
-
required :products,
|
|
17
|
-
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::ProductCollections::GroupCreateResponse::Product] }
|
|
18
|
-
|
|
19
|
-
# @!attribute status
|
|
20
|
-
#
|
|
21
|
-
# @return [Boolean]
|
|
22
|
-
required :status, Dodopayments::Internal::Type::Boolean
|
|
23
|
-
|
|
24
|
-
# @!attribute group_name
|
|
25
|
-
#
|
|
26
|
-
# @return [String, nil]
|
|
27
|
-
optional :group_name, String, nil?: true
|
|
28
|
-
|
|
29
|
-
# @!method initialize(group_id:, products:, status:, group_name: nil)
|
|
30
|
-
# @param group_id [String]
|
|
31
|
-
# @param products [Array<Dodopayments::Models::ProductCollections::GroupCreateResponse::Product>]
|
|
32
|
-
# @param status [Boolean]
|
|
33
|
-
# @param group_name [String, nil]
|
|
34
|
-
|
|
35
|
-
class Product < Dodopayments::Internal::Type::BaseModel
|
|
36
|
-
# @!attribute id
|
|
37
|
-
#
|
|
38
|
-
# @return [String]
|
|
39
|
-
required :id, String
|
|
40
|
-
|
|
41
|
-
# @!attribute addons_count
|
|
42
|
-
#
|
|
43
|
-
# @return [Integer]
|
|
44
|
-
required :addons_count, Integer
|
|
45
|
-
|
|
46
|
-
# @!attribute files_count
|
|
47
|
-
#
|
|
48
|
-
# @return [Integer]
|
|
49
|
-
required :files_count, Integer
|
|
50
|
-
|
|
51
|
-
# @!attribute has_credit_entitlements
|
|
52
|
-
# Whether this product has any credit entitlements attached
|
|
53
|
-
#
|
|
54
|
-
# @return [Boolean]
|
|
55
|
-
required :has_credit_entitlements, Dodopayments::Internal::Type::Boolean
|
|
56
|
-
|
|
57
|
-
# @!attribute is_recurring
|
|
58
|
-
#
|
|
59
|
-
# @return [Boolean]
|
|
60
|
-
required :is_recurring, Dodopayments::Internal::Type::Boolean
|
|
61
|
-
|
|
62
|
-
# @!attribute license_key_enabled
|
|
63
|
-
#
|
|
64
|
-
# @return [Boolean]
|
|
65
|
-
required :license_key_enabled, Dodopayments::Internal::Type::Boolean
|
|
66
|
-
|
|
67
|
-
# @!attribute meters_count
|
|
68
|
-
#
|
|
69
|
-
# @return [Integer]
|
|
70
|
-
required :meters_count, Integer
|
|
71
|
-
|
|
72
|
-
# @!attribute product_id
|
|
73
|
-
#
|
|
74
|
-
# @return [String]
|
|
75
|
-
required :product_id, String
|
|
76
|
-
|
|
77
|
-
# @!attribute status
|
|
78
|
-
#
|
|
79
|
-
# @return [Boolean]
|
|
80
|
-
required :status, Dodopayments::Internal::Type::Boolean
|
|
81
|
-
|
|
82
|
-
# @!attribute currency
|
|
83
|
-
#
|
|
84
|
-
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
|
85
|
-
optional :currency, enum: -> { Dodopayments::Currency }, nil?: true
|
|
86
|
-
|
|
87
|
-
# @!attribute description
|
|
88
|
-
#
|
|
89
|
-
# @return [String, nil]
|
|
90
|
-
optional :description, String, nil?: true
|
|
91
|
-
|
|
92
|
-
# @!attribute name
|
|
93
|
-
#
|
|
94
|
-
# @return [String, nil]
|
|
95
|
-
optional :name, String, nil?: true
|
|
96
|
-
|
|
97
|
-
# @!attribute price
|
|
98
|
-
#
|
|
99
|
-
# @return [Integer, nil]
|
|
100
|
-
optional :price, Integer, nil?: true
|
|
101
|
-
|
|
102
|
-
# @!attribute price_detail
|
|
103
|
-
# One-time price details.
|
|
104
|
-
#
|
|
105
|
-
# @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil]
|
|
106
|
-
optional :price_detail, union: -> { Dodopayments::Price }, nil?: true
|
|
107
|
-
|
|
108
|
-
# @!attribute tax_category
|
|
109
|
-
# Represents the different categories of taxation applicable to various products
|
|
110
|
-
# and services.
|
|
111
|
-
#
|
|
112
|
-
# @return [Symbol, Dodopayments::Models::TaxCategory, nil]
|
|
113
|
-
optional :tax_category, enum: -> { Dodopayments::TaxCategory }, nil?: true
|
|
114
|
-
|
|
115
|
-
# @!attribute tax_inclusive
|
|
116
|
-
#
|
|
117
|
-
# @return [Boolean, nil]
|
|
118
|
-
optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
119
|
-
|
|
120
|
-
# @!method initialize(id:, addons_count:, files_count:, has_credit_entitlements:, is_recurring:, license_key_enabled:, meters_count:, product_id:, status:, currency: nil, description: nil, name: nil, price: nil, price_detail: nil, tax_category: nil, tax_inclusive: nil)
|
|
121
|
-
# Some parameter documentations has been truncated, see
|
|
122
|
-
# {Dodopayments::Models::ProductCollections::GroupCreateResponse::Product} for
|
|
123
|
-
# more details.
|
|
124
|
-
#
|
|
125
|
-
# @param id [String]
|
|
126
|
-
#
|
|
127
|
-
# @param addons_count [Integer]
|
|
128
|
-
#
|
|
129
|
-
# @param files_count [Integer]
|
|
130
|
-
#
|
|
131
|
-
# @param has_credit_entitlements [Boolean] Whether this product has any credit entitlements attached
|
|
132
|
-
#
|
|
133
|
-
# @param is_recurring [Boolean]
|
|
134
|
-
#
|
|
135
|
-
# @param license_key_enabled [Boolean]
|
|
136
|
-
#
|
|
137
|
-
# @param meters_count [Integer]
|
|
138
|
-
#
|
|
139
|
-
# @param product_id [String]
|
|
140
|
-
#
|
|
141
|
-
# @param status [Boolean]
|
|
142
|
-
#
|
|
143
|
-
# @param currency [Symbol, Dodopayments::Models::Currency, nil]
|
|
144
|
-
#
|
|
145
|
-
# @param description [String, nil]
|
|
146
|
-
#
|
|
147
|
-
# @param name [String, nil]
|
|
148
|
-
#
|
|
149
|
-
# @param price [Integer, nil]
|
|
150
|
-
#
|
|
151
|
-
# @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil] One-time price details.
|
|
152
|
-
#
|
|
153
|
-
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Represents the different categories of taxation applicable to various products a
|
|
154
|
-
#
|
|
155
|
-
# @param tax_inclusive [Boolean, nil]
|
|
156
|
-
end
|
|
157
|
-
end
|
|
158
|
-
end
|
|
159
|
-
end
|
|
160
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
module ProductCollections
|
|
6
|
-
# @see Dodopayments::Resources::ProductCollections::Groups#delete
|
|
7
|
-
class GroupDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
-
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
-
|
|
11
|
-
# @!attribute id
|
|
12
|
-
#
|
|
13
|
-
# @return [String]
|
|
14
|
-
required :id, String
|
|
15
|
-
|
|
16
|
-
# @!attribute group_id
|
|
17
|
-
#
|
|
18
|
-
# @return [String]
|
|
19
|
-
required :group_id, String
|
|
20
|
-
|
|
21
|
-
# @!method initialize(id:, group_id:, request_options: {})
|
|
22
|
-
# @param id [String]
|
|
23
|
-
# @param group_id [String]
|
|
24
|
-
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
module ProductCollections
|
|
6
|
-
# @see Dodopayments::Resources::ProductCollections::Groups#update
|
|
7
|
-
class GroupUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
-
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
-
|
|
11
|
-
# @!attribute id
|
|
12
|
-
#
|
|
13
|
-
# @return [String]
|
|
14
|
-
required :id, String
|
|
15
|
-
|
|
16
|
-
# @!attribute group_id
|
|
17
|
-
#
|
|
18
|
-
# @return [String]
|
|
19
|
-
required :group_id, String
|
|
20
|
-
|
|
21
|
-
# @!attribute group_name
|
|
22
|
-
# Optional group name update: Some(Some(name)) = set name, Some(None) = clear
|
|
23
|
-
# name, None = no change
|
|
24
|
-
#
|
|
25
|
-
# @return [String, nil]
|
|
26
|
-
optional :group_name, String, nil?: true
|
|
27
|
-
|
|
28
|
-
# @!attribute product_order
|
|
29
|
-
# Optional new order for products in this group (array of
|
|
30
|
-
# product_collection_group_pdts UUIDs)
|
|
31
|
-
#
|
|
32
|
-
# @return [Array<String>, nil]
|
|
33
|
-
optional :product_order, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
|
|
34
|
-
|
|
35
|
-
# @!attribute status
|
|
36
|
-
# Optional status update
|
|
37
|
-
#
|
|
38
|
-
# @return [Boolean, nil]
|
|
39
|
-
optional :status, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
40
|
-
|
|
41
|
-
# @!method initialize(id:, group_id:, group_name: nil, product_order: nil, status: nil, request_options: {})
|
|
42
|
-
# Some parameter documentations has been truncated, see
|
|
43
|
-
# {Dodopayments::Models::ProductCollections::GroupUpdateParams} for more details.
|
|
44
|
-
#
|
|
45
|
-
# @param id [String]
|
|
46
|
-
#
|
|
47
|
-
# @param group_id [String]
|
|
48
|
-
#
|
|
49
|
-
# @param group_name [String, nil] Optional group name update: Some(Some(name)) = set name, Some(None) = clear name
|
|
50
|
-
#
|
|
51
|
-
# @param product_order [Array<String>, nil] Optional new order for products in this group (array of product_collection_group
|
|
52
|
-
#
|
|
53
|
-
# @param status [Boolean, nil] Optional status update
|
|
54
|
-
#
|
|
55
|
-
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
module ProductCollections
|
|
6
|
-
module Groups
|
|
7
|
-
# @see Dodopayments::Resources::ProductCollections::Groups::Items#create
|
|
8
|
-
class ItemCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
9
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
10
|
-
include Dodopayments::Internal::Type::RequestParameters
|
|
11
|
-
|
|
12
|
-
# @!attribute id
|
|
13
|
-
#
|
|
14
|
-
# @return [String]
|
|
15
|
-
required :id, String
|
|
16
|
-
|
|
17
|
-
# @!attribute group_id
|
|
18
|
-
#
|
|
19
|
-
# @return [String]
|
|
20
|
-
required :group_id, String
|
|
21
|
-
|
|
22
|
-
# @!attribute products
|
|
23
|
-
# Products to add to the group
|
|
24
|
-
#
|
|
25
|
-
# @return [Array<Dodopayments::Models::ProductCollections::Groups::ItemCreateParams::Product>]
|
|
26
|
-
required :products,
|
|
27
|
-
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductCollections::Groups::ItemCreateParams::Product] }
|
|
28
|
-
|
|
29
|
-
# @!method initialize(id:, group_id:, products:, request_options: {})
|
|
30
|
-
# @param id [String]
|
|
31
|
-
#
|
|
32
|
-
# @param group_id [String]
|
|
33
|
-
#
|
|
34
|
-
# @param products [Array<Dodopayments::Models::ProductCollections::Groups::ItemCreateParams::Product>] Products to add to the group
|
|
35
|
-
#
|
|
36
|
-
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
37
|
-
|
|
38
|
-
class Product < Dodopayments::Internal::Type::BaseModel
|
|
39
|
-
# @!attribute product_id
|
|
40
|
-
# Product ID to include in the group
|
|
41
|
-
#
|
|
42
|
-
# @return [String]
|
|
43
|
-
required :product_id, String
|
|
44
|
-
|
|
45
|
-
# @!attribute status
|
|
46
|
-
# Status of the product in this group (defaults to true if not provided)
|
|
47
|
-
#
|
|
48
|
-
# @return [Boolean, nil]
|
|
49
|
-
optional :status, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
50
|
-
|
|
51
|
-
# @!method initialize(product_id:, status: nil)
|
|
52
|
-
# @param product_id [String] Product ID to include in the group
|
|
53
|
-
#
|
|
54
|
-
# @param status [Boolean, nil] Status of the product in this group (defaults to true if not provided)
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
module ProductCollections
|
|
6
|
-
module Groups
|
|
7
|
-
class ItemCreateResponseItem < Dodopayments::Internal::Type::BaseModel
|
|
8
|
-
# @!attribute id
|
|
9
|
-
#
|
|
10
|
-
# @return [String]
|
|
11
|
-
required :id, String
|
|
12
|
-
|
|
13
|
-
# @!attribute addons_count
|
|
14
|
-
#
|
|
15
|
-
# @return [Integer]
|
|
16
|
-
required :addons_count, Integer
|
|
17
|
-
|
|
18
|
-
# @!attribute files_count
|
|
19
|
-
#
|
|
20
|
-
# @return [Integer]
|
|
21
|
-
required :files_count, Integer
|
|
22
|
-
|
|
23
|
-
# @!attribute has_credit_entitlements
|
|
24
|
-
# Whether this product has any credit entitlements attached
|
|
25
|
-
#
|
|
26
|
-
# @return [Boolean]
|
|
27
|
-
required :has_credit_entitlements, Dodopayments::Internal::Type::Boolean
|
|
28
|
-
|
|
29
|
-
# @!attribute is_recurring
|
|
30
|
-
#
|
|
31
|
-
# @return [Boolean]
|
|
32
|
-
required :is_recurring, Dodopayments::Internal::Type::Boolean
|
|
33
|
-
|
|
34
|
-
# @!attribute license_key_enabled
|
|
35
|
-
#
|
|
36
|
-
# @return [Boolean]
|
|
37
|
-
required :license_key_enabled, Dodopayments::Internal::Type::Boolean
|
|
38
|
-
|
|
39
|
-
# @!attribute meters_count
|
|
40
|
-
#
|
|
41
|
-
# @return [Integer]
|
|
42
|
-
required :meters_count, Integer
|
|
43
|
-
|
|
44
|
-
# @!attribute product_id
|
|
45
|
-
#
|
|
46
|
-
# @return [String]
|
|
47
|
-
required :product_id, String
|
|
48
|
-
|
|
49
|
-
# @!attribute status
|
|
50
|
-
#
|
|
51
|
-
# @return [Boolean]
|
|
52
|
-
required :status, Dodopayments::Internal::Type::Boolean
|
|
53
|
-
|
|
54
|
-
# @!attribute currency
|
|
55
|
-
#
|
|
56
|
-
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
|
57
|
-
optional :currency, enum: -> { Dodopayments::Currency }, nil?: true
|
|
58
|
-
|
|
59
|
-
# @!attribute description
|
|
60
|
-
#
|
|
61
|
-
# @return [String, nil]
|
|
62
|
-
optional :description, String, nil?: true
|
|
63
|
-
|
|
64
|
-
# @!attribute name
|
|
65
|
-
#
|
|
66
|
-
# @return [String, nil]
|
|
67
|
-
optional :name, String, nil?: true
|
|
68
|
-
|
|
69
|
-
# @!attribute price
|
|
70
|
-
#
|
|
71
|
-
# @return [Integer, nil]
|
|
72
|
-
optional :price, Integer, nil?: true
|
|
73
|
-
|
|
74
|
-
# @!attribute price_detail
|
|
75
|
-
# One-time price details.
|
|
76
|
-
#
|
|
77
|
-
# @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil]
|
|
78
|
-
optional :price_detail, union: -> { Dodopayments::Price }, nil?: true
|
|
79
|
-
|
|
80
|
-
# @!attribute tax_category
|
|
81
|
-
# Represents the different categories of taxation applicable to various products
|
|
82
|
-
# and services.
|
|
83
|
-
#
|
|
84
|
-
# @return [Symbol, Dodopayments::Models::TaxCategory, nil]
|
|
85
|
-
optional :tax_category, enum: -> { Dodopayments::TaxCategory }, nil?: true
|
|
86
|
-
|
|
87
|
-
# @!attribute tax_inclusive
|
|
88
|
-
#
|
|
89
|
-
# @return [Boolean, nil]
|
|
90
|
-
optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
91
|
-
|
|
92
|
-
# @!method initialize(id:, addons_count:, files_count:, has_credit_entitlements:, is_recurring:, license_key_enabled:, meters_count:, product_id:, status:, currency: nil, description: nil, name: nil, price: nil, price_detail: nil, tax_category: nil, tax_inclusive: nil)
|
|
93
|
-
# Some parameter documentations has been truncated, see
|
|
94
|
-
# {Dodopayments::Models::ProductCollections::Groups::ItemCreateResponseItem} for
|
|
95
|
-
# more details.
|
|
96
|
-
#
|
|
97
|
-
# @param id [String]
|
|
98
|
-
#
|
|
99
|
-
# @param addons_count [Integer]
|
|
100
|
-
#
|
|
101
|
-
# @param files_count [Integer]
|
|
102
|
-
#
|
|
103
|
-
# @param has_credit_entitlements [Boolean] Whether this product has any credit entitlements attached
|
|
104
|
-
#
|
|
105
|
-
# @param is_recurring [Boolean]
|
|
106
|
-
#
|
|
107
|
-
# @param license_key_enabled [Boolean]
|
|
108
|
-
#
|
|
109
|
-
# @param meters_count [Integer]
|
|
110
|
-
#
|
|
111
|
-
# @param product_id [String]
|
|
112
|
-
#
|
|
113
|
-
# @param status [Boolean]
|
|
114
|
-
#
|
|
115
|
-
# @param currency [Symbol, Dodopayments::Models::Currency, nil]
|
|
116
|
-
#
|
|
117
|
-
# @param description [String, nil]
|
|
118
|
-
#
|
|
119
|
-
# @param name [String, nil]
|
|
120
|
-
#
|
|
121
|
-
# @param price [Integer, nil]
|
|
122
|
-
#
|
|
123
|
-
# @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil] One-time price details.
|
|
124
|
-
#
|
|
125
|
-
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Represents the different categories of taxation applicable to various products a
|
|
126
|
-
#
|
|
127
|
-
# @param tax_inclusive [Boolean, nil]
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
# @type [Dodopayments::Internal::Type::Converter]
|
|
131
|
-
ItemCreateResponse =
|
|
132
|
-
Dodopayments::Internal::Type::ArrayOf[-> { Dodopayments::Models::ProductCollections::Groups::ItemCreateResponseItem }]
|
|
133
|
-
end
|
|
134
|
-
end
|
|
135
|
-
end
|
|
136
|
-
end
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
module ProductCollections
|
|
6
|
-
module Groups
|
|
7
|
-
# @see Dodopayments::Resources::ProductCollections::Groups::Items#delete
|
|
8
|
-
class ItemDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
9
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
10
|
-
include Dodopayments::Internal::Type::RequestParameters
|
|
11
|
-
|
|
12
|
-
# @!attribute id
|
|
13
|
-
#
|
|
14
|
-
# @return [String]
|
|
15
|
-
required :id, String
|
|
16
|
-
|
|
17
|
-
# @!attribute group_id
|
|
18
|
-
#
|
|
19
|
-
# @return [String]
|
|
20
|
-
required :group_id, String
|
|
21
|
-
|
|
22
|
-
# @!attribute item_id
|
|
23
|
-
#
|
|
24
|
-
# @return [String]
|
|
25
|
-
required :item_id, String
|
|
26
|
-
|
|
27
|
-
# @!method initialize(id:, group_id:, item_id:, request_options: {})
|
|
28
|
-
# @param id [String]
|
|
29
|
-
# @param group_id [String]
|
|
30
|
-
# @param item_id [String]
|
|
31
|
-
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
module ProductCollections
|
|
6
|
-
module Groups
|
|
7
|
-
# @see Dodopayments::Resources::ProductCollections::Groups::Items#update
|
|
8
|
-
class ItemUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
9
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
10
|
-
include Dodopayments::Internal::Type::RequestParameters
|
|
11
|
-
|
|
12
|
-
# @!attribute id
|
|
13
|
-
#
|
|
14
|
-
# @return [String]
|
|
15
|
-
required :id, String
|
|
16
|
-
|
|
17
|
-
# @!attribute group_id
|
|
18
|
-
#
|
|
19
|
-
# @return [String]
|
|
20
|
-
required :group_id, String
|
|
21
|
-
|
|
22
|
-
# @!attribute item_id
|
|
23
|
-
#
|
|
24
|
-
# @return [String]
|
|
25
|
-
required :item_id, String
|
|
26
|
-
|
|
27
|
-
# @!attribute status
|
|
28
|
-
# Status of the product in the group
|
|
29
|
-
#
|
|
30
|
-
# @return [Boolean]
|
|
31
|
-
required :status, Dodopayments::Internal::Type::Boolean
|
|
32
|
-
|
|
33
|
-
# @!method initialize(id:, group_id:, item_id:, status:, request_options: {})
|
|
34
|
-
# @param id [String]
|
|
35
|
-
#
|
|
36
|
-
# @param group_id [String]
|
|
37
|
-
#
|
|
38
|
-
# @param item_id [String]
|
|
39
|
-
#
|
|
40
|
-
# @param status [Boolean] Status of the product in the group
|
|
41
|
-
#
|
|
42
|
-
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
# @see Dodopayments::Resources::YourWebhookURL#create
|
|
6
|
-
class YourWebhookURLCreateParams < Dodopayments::Models::WebhookPayload
|
|
7
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
# @!attribute webhook_id
|
|
11
|
-
#
|
|
12
|
-
# @return [String]
|
|
13
|
-
required :webhook_id, String
|
|
14
|
-
|
|
15
|
-
# @!attribute webhook_signature
|
|
16
|
-
#
|
|
17
|
-
# @return [String]
|
|
18
|
-
required :webhook_signature, String
|
|
19
|
-
|
|
20
|
-
# @!attribute webhook_timestamp
|
|
21
|
-
#
|
|
22
|
-
# @return [String]
|
|
23
|
-
required :webhook_timestamp, String
|
|
24
|
-
|
|
25
|
-
# @!method initialize(webhook_id:, webhook_signature:, webhook_timestamp:, request_options: {})
|
|
26
|
-
# @param webhook_id [String]
|
|
27
|
-
# @param webhook_signature [String]
|
|
28
|
-
# @param webhook_timestamp [String]
|
|
29
|
-
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Resources
|
|
5
|
-
class ProductCollections
|
|
6
|
-
class Groups
|
|
7
|
-
class Items
|
|
8
|
-
# @overload create(group_id, id:, products:, request_options: {})
|
|
9
|
-
#
|
|
10
|
-
# @param group_id [String] Path param: Product Collection Group Id
|
|
11
|
-
#
|
|
12
|
-
# @param id [String] Path param: Product Collection Id
|
|
13
|
-
#
|
|
14
|
-
# @param products [Array<Dodopayments::Models::ProductCollections::Groups::ItemCreateParams::Product>] Body param: Products to add to the group
|
|
15
|
-
#
|
|
16
|
-
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
17
|
-
#
|
|
18
|
-
# @return [Array<Dodopayments::Models::ProductCollections::Groups::ItemCreateResponseItem>]
|
|
19
|
-
#
|
|
20
|
-
# @see Dodopayments::Models::ProductCollections::Groups::ItemCreateParams
|
|
21
|
-
def create(group_id, params)
|
|
22
|
-
parsed, options = Dodopayments::ProductCollections::Groups::ItemCreateParams.dump_request(params)
|
|
23
|
-
id =
|
|
24
|
-
parsed.delete(:id) do
|
|
25
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
26
|
-
end
|
|
27
|
-
@client.request(
|
|
28
|
-
method: :post,
|
|
29
|
-
path: ["product-collections/%1$s/groups/%2$s/items", id, group_id],
|
|
30
|
-
body: parsed,
|
|
31
|
-
model: Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::ProductCollections::Groups::ItemCreateResponseItem],
|
|
32
|
-
options: options
|
|
33
|
-
)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# @overload update(item_id, id:, group_id:, status:, request_options: {})
|
|
37
|
-
#
|
|
38
|
-
# @param item_id [String] Path param: Collection item Id (product membership in group)
|
|
39
|
-
#
|
|
40
|
-
# @param id [String] Path param: Product Collection Id
|
|
41
|
-
#
|
|
42
|
-
# @param group_id [String] Path param: Product Collection Group Id
|
|
43
|
-
#
|
|
44
|
-
# @param status [Boolean] Body param: Status of the product in the group
|
|
45
|
-
#
|
|
46
|
-
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
47
|
-
#
|
|
48
|
-
# @return [nil]
|
|
49
|
-
#
|
|
50
|
-
# @see Dodopayments::Models::ProductCollections::Groups::ItemUpdateParams
|
|
51
|
-
def update(item_id, params)
|
|
52
|
-
parsed, options = Dodopayments::ProductCollections::Groups::ItemUpdateParams.dump_request(params)
|
|
53
|
-
id =
|
|
54
|
-
parsed.delete(:id) do
|
|
55
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
56
|
-
end
|
|
57
|
-
group_id =
|
|
58
|
-
parsed.delete(:group_id) do
|
|
59
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
60
|
-
end
|
|
61
|
-
@client.request(
|
|
62
|
-
method: :patch,
|
|
63
|
-
path: ["product-collections/%1$s/groups/%2$s/items/%3$s", id, group_id, item_id],
|
|
64
|
-
body: parsed,
|
|
65
|
-
model: NilClass,
|
|
66
|
-
options: options
|
|
67
|
-
)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
# @overload delete(item_id, id:, group_id:, request_options: {})
|
|
71
|
-
#
|
|
72
|
-
# @param item_id [String] Collection item Id (product membership in group)
|
|
73
|
-
#
|
|
74
|
-
# @param id [String] Product Collection Id
|
|
75
|
-
#
|
|
76
|
-
# @param group_id [String] Product Collection Group Id
|
|
77
|
-
#
|
|
78
|
-
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
79
|
-
#
|
|
80
|
-
# @return [nil]
|
|
81
|
-
#
|
|
82
|
-
# @see Dodopayments::Models::ProductCollections::Groups::ItemDeleteParams
|
|
83
|
-
def delete(item_id, params)
|
|
84
|
-
parsed, options = Dodopayments::ProductCollections::Groups::ItemDeleteParams.dump_request(params)
|
|
85
|
-
id =
|
|
86
|
-
parsed.delete(:id) do
|
|
87
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
88
|
-
end
|
|
89
|
-
group_id =
|
|
90
|
-
parsed.delete(:group_id) do
|
|
91
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
92
|
-
end
|
|
93
|
-
@client.request(
|
|
94
|
-
method: :delete,
|
|
95
|
-
path: ["product-collections/%1$s/groups/%2$s/items/%3$s", id, group_id, item_id],
|
|
96
|
-
model: NilClass,
|
|
97
|
-
options: options
|
|
98
|
-
)
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# @api private
|
|
102
|
-
#
|
|
103
|
-
# @param client [Dodopayments::Client]
|
|
104
|
-
def initialize(client:)
|
|
105
|
-
@client = client
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
end
|