solifyn 1.0.0 → 1.0.5

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.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -7
  3. data/docs/BalanceApi.md +1 -1
  4. data/docs/CheckoutApi.md +1 -1
  5. data/docs/CheckoutLinksApi.md +1 -1
  6. data/docs/CheckoutSessionDetailsDto.md +3 -1
  7. data/docs/CollectionProductDto.md +12 -0
  8. data/docs/CollectionsApi.md +1 -1
  9. data/docs/CustomersApi.md +1 -1
  10. data/docs/DefaultApi.md +285 -1
  11. data/docs/DeveloperApi.md +1 -1
  12. data/docs/DigitalFileApi.md +1 -1
  13. data/docs/DiscordIntegrationApi.md +135 -0
  14. data/docs/DiscordRolesResponseDto.md +24 -0
  15. data/docs/DiscountsApi.md +1 -1
  16. data/docs/DisputesApi.md +1 -1
  17. data/docs/EntitlementGrantResponseDto.md +54 -0
  18. data/docs/EntitlementGrantsApi.md +289 -0
  19. data/docs/GitHubIntegrationApi.md +145 -0
  20. data/docs/GithubReposResponseDto.md +22 -0
  21. data/docs/LicenseApi.md +1 -1
  22. data/docs/LicenseKeysApi.md +1 -1
  23. data/docs/LicenseKeysClientApi.md +1 -1
  24. data/docs/MetersApi.md +1 -1
  25. data/docs/OrdersApi.md +1 -1
  26. data/docs/Product.md +12 -0
  27. data/docs/ProductAddOnsApi.md +1 -1
  28. data/docs/ProductCreate.md +12 -0
  29. data/docs/ProductUpdate.md +12 -0
  30. data/docs/ProductsApi.md +1 -1
  31. data/docs/RefundRequestsApi.md +1 -1
  32. data/docs/RefundsChargebacksApi.md +1 -1
  33. data/docs/SubscriptionsApi.md +1 -1
  34. data/docs/SyncLoginDto.md +18 -0
  35. data/docs/WebhookApi.md +1 -1
  36. data/docs/WebhookEndpointApi.md +55 -10
  37. data/docs/WebhookEntitlementGrantPayload.md +44 -0
  38. data/git_push.sh +2 -2
  39. data/lib/solifyn/api/default_api.rb +248 -0
  40. data/lib/solifyn/api/{partner_api.rb → discord_integration_api.rb} +32 -19
  41. data/lib/solifyn/api/entitlement_grants_api.rb +271 -0
  42. data/lib/solifyn/api/git_hub_integration_api.rb +137 -0
  43. data/lib/solifyn/api/webhook_endpoint_api.rb +9 -9
  44. data/lib/solifyn/configuration.rb +4 -4
  45. data/lib/solifyn/models/checkout_session_details_dto.rb +16 -4
  46. data/lib/solifyn/models/collection_product_dto.rb +115 -1
  47. data/lib/solifyn/models/{payout_method.rb → discord_roles_response_dto.rb} +41 -34
  48. data/lib/solifyn/models/{withdrawal.rb → entitlement_grant_response_dto.rb} +149 -109
  49. data/lib/solifyn/models/{payout_account.rb → github_repos_response_dto.rb} +31 -24
  50. data/lib/solifyn/models/product.rb +115 -1
  51. data/lib/solifyn/models/product_create.rb +77 -1
  52. data/lib/solifyn/models/product_update.rb +77 -1
  53. data/lib/solifyn/models/{payout_method_list.rb → sync_login_dto.rb} +15 -17
  54. data/lib/solifyn/models/{payout_verification.rb → webhook_entitlement_grant_payload.rb} +118 -41
  55. data/lib/solifyn/version.rb +1 -1
  56. data/lib/solifyn.rb +8 -0
  57. data/spec/api/checkout_api_spec.rb +12 -0
  58. data/spec/api/default_api_spec.rb +59 -11
  59. data/spec/api/developer_api_spec.rb +52 -29
  60. data/spec/api/{partner_api_spec.rb → discord_integration_api_spec.rb} +16 -11
  61. data/spec/api/entitlement_grants_api_spec.rb +83 -0
  62. data/spec/api/git_hub_integration_api_spec.rb +58 -0
  63. data/spec/models/checkout_session_details_dto_spec.rb +6 -0
  64. data/spec/models/collection_product_dto_spec.rb +28 -0
  65. data/spec/models/{payout_method_spec.rb → discord_roles_response_dto_spec.rb} +9 -9
  66. data/spec/models/{withdrawal_spec.rb → entitlement_grant_response_dto_spec.rb} +18 -18
  67. data/spec/models/{payout_account_spec.rb → github_repos_response_dto_spec.rb} +8 -8
  68. data/spec/models/order_spec.rb +6 -0
  69. data/spec/models/product_create_spec.rb +28 -0
  70. data/spec/models/product_spec.rb +28 -0
  71. data/spec/models/product_update_spec.rb +28 -0
  72. data/spec/models/{business_create_spec.rb → sync_login_dto_spec.rb} +7 -7
  73. data/spec/models/{business_spec.rb → webhook_entitlement_grant_payload_spec.rb} +17 -53
  74. metadata +162 -254
  75. data/docs/AffiliateApi.md +0 -845
  76. data/docs/BillingApi.md +0 -68
  77. data/docs/BrandsApi.md +0 -286
  78. data/docs/Business.md +0 -56
  79. data/docs/BusinessCreate.md +0 -18
  80. data/docs/BusinessFullCreate.md +0 -26
  81. data/docs/BusinessFullCreateResponse.md +0 -20
  82. data/docs/BusinessesApi.md +0 -350
  83. data/docs/ChatApi.md +0 -246
  84. data/docs/CommunityApi.md +0 -497
  85. data/docs/PartnerApi.md +0 -125
  86. data/docs/PayoutAccessToken.md +0 -20
  87. data/docs/PayoutAccount.md +0 -22
  88. data/docs/PayoutAccountLink.md +0 -20
  89. data/docs/PayoutMethod.md +0 -24
  90. data/docs/PayoutMethodList.md +0 -18
  91. data/docs/PayoutVerification.md +0 -24
  92. data/docs/PayoutVerificationList.md +0 -18
  93. data/docs/PayoutsApi.md +0 -579
  94. data/docs/TicketApi.md +0 -318
  95. data/docs/UserPage.md +0 -26
  96. data/docs/UserProfileThemesApi.md +0 -345
  97. data/docs/UserSettings.md +0 -34
  98. data/docs/UserSettingsUpdate.md +0 -76
  99. data/docs/UserStats.md +0 -20
  100. data/docs/UserTheme.md +0 -26
  101. data/docs/UserThemeUpdate.md +0 -22
  102. data/docs/WhopApiKeysRotation.md +0 -18
  103. data/docs/Withdrawal.md +0 -46
  104. data/docs/WithdrawalCreate.md +0 -22
  105. data/docs/WithdrawalList.md +0 -20
  106. data/lib/solifyn/api/affiliate_api.rb +0 -760
  107. data/lib/solifyn/api/billing_api.rb +0 -77
  108. data/lib/solifyn/api/brands_api.rb +0 -284
  109. data/lib/solifyn/api/businesses_api.rb +0 -338
  110. data/lib/solifyn/api/chat_api.rb +0 -232
  111. data/lib/solifyn/api/community_api.rb +0 -466
  112. data/lib/solifyn/api/payouts_api.rb +0 -520
  113. data/lib/solifyn/api/ticket_api.rb +0 -328
  114. data/lib/solifyn/api/user_profile_themes_api.rb +0 -313
  115. data/lib/solifyn/models/business.rb +0 -482
  116. data/lib/solifyn/models/business_create.rb +0 -241
  117. data/lib/solifyn/models/business_full_create.rb +0 -288
  118. data/lib/solifyn/models/business_full_create_response.rb +0 -239
  119. data/lib/solifyn/models/payout_access_token.rb +0 -239
  120. data/lib/solifyn/models/payout_account_link.rb +0 -239
  121. data/lib/solifyn/models/payout_verification_list.rb +0 -224
  122. data/lib/solifyn/models/user_page.rb +0 -290
  123. data/lib/solifyn/models/user_settings.rb +0 -337
  124. data/lib/solifyn/models/user_settings_update.rb +0 -505
  125. data/lib/solifyn/models/user_stats.rb +0 -241
  126. data/lib/solifyn/models/user_theme.rb +0 -276
  127. data/lib/solifyn/models/user_theme_update.rb +0 -235
  128. data/lib/solifyn/models/whop_api_keys_rotation.rb +0 -222
  129. data/lib/solifyn/models/withdrawal_create.rb +0 -249
  130. data/lib/solifyn/models/withdrawal_list.rb +0 -241
  131. data/spec/api/affiliate_api_spec.rb +0 -165
  132. data/spec/api/billing_api_spec.rb +0 -46
  133. data/spec/api/brands_api_spec.rb +0 -83
  134. data/spec/api/businesses_api_spec.rb +0 -93
  135. data/spec/api/chat_api_spec.rb +0 -72
  136. data/spec/api/community_api_spec.rb +0 -113
  137. data/spec/api/payouts_api_spec.rb +0 -133
  138. data/spec/api/ticket_api_spec.rb +0 -86
  139. data/spec/api/user_profile_themes_api_spec.rb +0 -91
  140. data/spec/models/business_full_create_response_spec.rb +0 -42
  141. data/spec/models/business_full_create_spec.rb +0 -60
  142. data/spec/models/payout_access_token_spec.rb +0 -42
  143. data/spec/models/payout_account_link_spec.rb +0 -42
  144. data/spec/models/payout_method_list_spec.rb +0 -36
  145. data/spec/models/payout_verification_list_spec.rb +0 -36
  146. data/spec/models/payout_verification_spec.rb +0 -54
  147. data/spec/models/user_page_spec.rb +0 -60
  148. data/spec/models/user_settings_spec.rb +0 -84
  149. data/spec/models/user_settings_update_spec.rb +0 -210
  150. data/spec/models/user_stats_spec.rb +0 -42
  151. data/spec/models/user_theme_spec.rb +0 -60
  152. data/spec/models/user_theme_update_spec.rb +0 -48
  153. data/spec/models/whop_api_keys_rotation_spec.rb +0 -36
  154. data/spec/models/withdrawal_create_spec.rb +0 -48
  155. data/spec/models/withdrawal_list_spec.rb +0 -42
@@ -1,77 +0,0 @@
1
- =begin
2
- #Solifyn API
3
-
4
- #Welcome to the Solifyn API Reference. Leverage our secure endpoints to manage products and issue, validate, and manage software license keys programmatically.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.10.0
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module Solifyn
16
- class BillingApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Get Platform Plans
23
- # Returns all available platform subscription plans with fees and features.
24
- # @param [Hash] opts the optional parameters
25
- # @return [nil]
26
- def billing_get_plans(opts = {})
27
- billing_get_plans_with_http_info(opts)
28
- nil
29
- end
30
-
31
- # Get Platform Plans
32
- # Returns all available platform subscription plans with fees and features.
33
- # @param [Hash] opts the optional parameters
34
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
- def billing_get_plans_with_http_info(opts = {})
36
- if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: BillingApi.billing_get_plans ...'
38
- end
39
- # resource path
40
- local_var_path = '/v1/billing/plans'
41
-
42
- # query parameters
43
- query_params = opts[:query_params] || {}
44
-
45
- # header parameters
46
- header_params = opts[:header_params] || {}
47
-
48
- # form parameters
49
- form_params = opts[:form_params] || {}
50
-
51
- # http body (model)
52
- post_body = opts[:debug_body]
53
-
54
- # return_type
55
- return_type = opts[:debug_return_type]
56
-
57
- # auth_names
58
- auth_names = opts[:debug_auth_names] || []
59
-
60
- new_options = opts.merge(
61
- :operation => :"BillingApi.billing_get_plans",
62
- :header_params => header_params,
63
- :query_params => query_params,
64
- :form_params => form_params,
65
- :body => post_body,
66
- :auth_names => auth_names,
67
- :return_type => return_type
68
- )
69
-
70
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
71
- if @api_client.config.debugging
72
- @api_client.config.logger.debug "API called: BillingApi#billing_get_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
- end
74
- return data, status_code, headers
75
- end
76
- end
77
- end
@@ -1,284 +0,0 @@
1
- =begin
2
- #Solifyn API
3
-
4
- #Welcome to the Solifyn API Reference. Leverage our secure endpoints to manage products and issue, validate, and manage software license keys programmatically.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.10.0
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module Solifyn
16
- class BrandsApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Create Brand
23
- # Add a new brand identity under the current active business.
24
- # @param brand_create [BrandCreate]
25
- # @param [Hash] opts the optional parameters
26
- # @return [Brand]
27
- def brands_create(brand_create, opts = {})
28
- data, _status_code, _headers = brands_create_with_http_info(brand_create, opts)
29
- data
30
- end
31
-
32
- # Create Brand
33
- # Add a new brand identity under the current active business.
34
- # @param brand_create [BrandCreate]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(Brand, Integer, Hash)>] Brand data, response status code and response headers
37
- def brands_create_with_http_info(brand_create, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: BrandsApi.brands_create ...'
40
- end
41
- # verify the required parameter 'brand_create' is set
42
- if @api_client.config.client_side_validation && brand_create.nil?
43
- fail ArgumentError, "Missing the required parameter 'brand_create' when calling BrandsApi.brands_create"
44
- end
45
- # resource path
46
- local_var_path = '/v1/user/brand'
47
-
48
- # query parameters
49
- query_params = opts[:query_params] || {}
50
-
51
- # header parameters
52
- header_params = opts[:header_params] || {}
53
- # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
- # HTTP header 'Content-Type'
56
- content_type = @api_client.select_header_content_type(['application/json'])
57
- if !content_type.nil?
58
- header_params['Content-Type'] = content_type
59
- end
60
-
61
- # form parameters
62
- form_params = opts[:form_params] || {}
63
-
64
- # http body (model)
65
- post_body = opts[:debug_body] || @api_client.object_to_http_body(brand_create)
66
-
67
- # return_type
68
- return_type = opts[:debug_return_type] || 'Brand'
69
-
70
- # auth_names
71
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
72
-
73
- new_options = opts.merge(
74
- :operation => :"BrandsApi.brands_create",
75
- :header_params => header_params,
76
- :query_params => query_params,
77
- :form_params => form_params,
78
- :body => post_body,
79
- :auth_names => auth_names,
80
- :return_type => return_type
81
- )
82
-
83
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
- if @api_client.config.debugging
85
- @api_client.config.logger.debug "API called: BrandsApi#brands_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
- end
87
- return data, status_code, headers
88
- end
89
-
90
- # Retrieve Brand
91
- # Retrieve details of a brand identity by ID.
92
- # @param id [String] The brand ID to retrieve
93
- # @param [Hash] opts the optional parameters
94
- # @return [Brand]
95
- def brands_get(id, opts = {})
96
- data, _status_code, _headers = brands_get_with_http_info(id, opts)
97
- data
98
- end
99
-
100
- # Retrieve Brand
101
- # Retrieve details of a brand identity by ID.
102
- # @param id [String] The brand ID to retrieve
103
- # @param [Hash] opts the optional parameters
104
- # @return [Array<(Brand, Integer, Hash)>] Brand data, response status code and response headers
105
- def brands_get_with_http_info(id, opts = {})
106
- if @api_client.config.debugging
107
- @api_client.config.logger.debug 'Calling API: BrandsApi.brands_get ...'
108
- end
109
- # verify the required parameter 'id' is set
110
- if @api_client.config.client_side_validation && id.nil?
111
- fail ArgumentError, "Missing the required parameter 'id' when calling BrandsApi.brands_get"
112
- end
113
- # resource path
114
- local_var_path = '/v1/user/brand/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
115
-
116
- # query parameters
117
- query_params = opts[:query_params] || {}
118
-
119
- # header parameters
120
- header_params = opts[:header_params] || {}
121
- # HTTP header 'Accept' (if needed)
122
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
-
124
- # form parameters
125
- form_params = opts[:form_params] || {}
126
-
127
- # http body (model)
128
- post_body = opts[:debug_body]
129
-
130
- # return_type
131
- return_type = opts[:debug_return_type] || 'Brand'
132
-
133
- # auth_names
134
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
135
-
136
- new_options = opts.merge(
137
- :operation => :"BrandsApi.brands_get",
138
- :header_params => header_params,
139
- :query_params => query_params,
140
- :form_params => form_params,
141
- :body => post_body,
142
- :auth_names => auth_names,
143
- :return_type => return_type
144
- )
145
-
146
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
147
- if @api_client.config.debugging
148
- @api_client.config.logger.debug "API called: BrandsApi#brands_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
- end
150
- return data, status_code, headers
151
- end
152
-
153
- # List Brands
154
- # Retrieve all brands associated with the current business context.
155
- # @param [Hash] opts the optional parameters
156
- # @return [Array<Brand>]
157
- def brands_list(opts = {})
158
- data, _status_code, _headers = brands_list_with_http_info(opts)
159
- data
160
- end
161
-
162
- # List Brands
163
- # Retrieve all brands associated with the current business context.
164
- # @param [Hash] opts the optional parameters
165
- # @return [Array<(Array<Brand>, Integer, Hash)>] Array<Brand> data, response status code and response headers
166
- def brands_list_with_http_info(opts = {})
167
- if @api_client.config.debugging
168
- @api_client.config.logger.debug 'Calling API: BrandsApi.brands_list ...'
169
- end
170
- # resource path
171
- local_var_path = '/v1/user/brands'
172
-
173
- # query parameters
174
- query_params = opts[:query_params] || {}
175
-
176
- # header parameters
177
- header_params = opts[:header_params] || {}
178
- # HTTP header 'Accept' (if needed)
179
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
180
-
181
- # form parameters
182
- form_params = opts[:form_params] || {}
183
-
184
- # http body (model)
185
- post_body = opts[:debug_body]
186
-
187
- # return_type
188
- return_type = opts[:debug_return_type] || 'Array<Brand>'
189
-
190
- # auth_names
191
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
192
-
193
- new_options = opts.merge(
194
- :operation => :"BrandsApi.brands_list",
195
- :header_params => header_params,
196
- :query_params => query_params,
197
- :form_params => form_params,
198
- :body => post_body,
199
- :auth_names => auth_names,
200
- :return_type => return_type
201
- )
202
-
203
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
204
- if @api_client.config.debugging
205
- @api_client.config.logger.debug "API called: BrandsApi#brands_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
- end
207
- return data, status_code, headers
208
- end
209
-
210
- # Update Brand
211
- # Update website, logo, description, or statement descriptors of a brand.
212
- # @param id [String] The brand ID to update
213
- # @param brand_update [BrandUpdate]
214
- # @param [Hash] opts the optional parameters
215
- # @return [Brand]
216
- def brands_update(id, brand_update, opts = {})
217
- data, _status_code, _headers = brands_update_with_http_info(id, brand_update, opts)
218
- data
219
- end
220
-
221
- # Update Brand
222
- # Update website, logo, description, or statement descriptors of a brand.
223
- # @param id [String] The brand ID to update
224
- # @param brand_update [BrandUpdate]
225
- # @param [Hash] opts the optional parameters
226
- # @return [Array<(Brand, Integer, Hash)>] Brand data, response status code and response headers
227
- def brands_update_with_http_info(id, brand_update, opts = {})
228
- if @api_client.config.debugging
229
- @api_client.config.logger.debug 'Calling API: BrandsApi.brands_update ...'
230
- end
231
- # verify the required parameter 'id' is set
232
- if @api_client.config.client_side_validation && id.nil?
233
- fail ArgumentError, "Missing the required parameter 'id' when calling BrandsApi.brands_update"
234
- end
235
- # verify the required parameter 'brand_update' is set
236
- if @api_client.config.client_side_validation && brand_update.nil?
237
- fail ArgumentError, "Missing the required parameter 'brand_update' when calling BrandsApi.brands_update"
238
- end
239
- # resource path
240
- local_var_path = '/v1/user/brand/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
241
-
242
- # query parameters
243
- query_params = opts[:query_params] || {}
244
-
245
- # header parameters
246
- header_params = opts[:header_params] || {}
247
- # HTTP header 'Accept' (if needed)
248
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
249
- # HTTP header 'Content-Type'
250
- content_type = @api_client.select_header_content_type(['application/json'])
251
- if !content_type.nil?
252
- header_params['Content-Type'] = content_type
253
- end
254
-
255
- # form parameters
256
- form_params = opts[:form_params] || {}
257
-
258
- # http body (model)
259
- post_body = opts[:debug_body] || @api_client.object_to_http_body(brand_update)
260
-
261
- # return_type
262
- return_type = opts[:debug_return_type] || 'Brand'
263
-
264
- # auth_names
265
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
266
-
267
- new_options = opts.merge(
268
- :operation => :"BrandsApi.brands_update",
269
- :header_params => header_params,
270
- :query_params => query_params,
271
- :form_params => form_params,
272
- :body => post_body,
273
- :auth_names => auth_names,
274
- :return_type => return_type
275
- )
276
-
277
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
278
- if @api_client.config.debugging
279
- @api_client.config.logger.debug "API called: BrandsApi#brands_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
280
- end
281
- return data, status_code, headers
282
- end
283
- end
284
- end
@@ -1,338 +0,0 @@
1
- =begin
2
- #Solifyn API
3
-
4
- #Welcome to the Solifyn API Reference. Leverage our secure endpoints to manage products and issue, validate, and manage software license keys programmatically.
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.10.0
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module Solifyn
16
- class BusinessesApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Get Platform Billing History
23
- # Retrieve history of SaaS subscription payments paid by this business to the platform.
24
- # @param [Hash] opts the optional parameters
25
- # @return [nil]
26
- def businesses_billing_history(opts = {})
27
- businesses_billing_history_with_http_info(opts)
28
- nil
29
- end
30
-
31
- # Get Platform Billing History
32
- # Retrieve history of SaaS subscription payments paid by this business to the platform.
33
- # @param [Hash] opts the optional parameters
34
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
- def businesses_billing_history_with_http_info(opts = {})
36
- if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: BusinessesApi.businesses_billing_history ...'
38
- end
39
- # resource path
40
- local_var_path = '/v1/user/billing/history'
41
-
42
- # query parameters
43
- query_params = opts[:query_params] || {}
44
-
45
- # header parameters
46
- header_params = opts[:header_params] || {}
47
-
48
- # form parameters
49
- form_params = opts[:form_params] || {}
50
-
51
- # http body (model)
52
- post_body = opts[:debug_body]
53
-
54
- # return_type
55
- return_type = opts[:debug_return_type]
56
-
57
- # auth_names
58
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
59
-
60
- new_options = opts.merge(
61
- :operation => :"BusinessesApi.businesses_billing_history",
62
- :header_params => header_params,
63
- :query_params => query_params,
64
- :form_params => form_params,
65
- :body => post_body,
66
- :auth_names => auth_names,
67
- :return_type => return_type
68
- )
69
-
70
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
71
- if @api_client.config.debugging
72
- @api_client.config.logger.debug "API called: BusinessesApi#businesses_billing_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
- end
74
- return data, status_code, headers
75
- end
76
-
77
- # Rotate Whop API Keys
78
- # Generate and sync a new Whop Child Company API key (restricted to business owners).
79
- # @param [Hash] opts the optional parameters
80
- # @return [WhopApiKeysRotation]
81
- def merchants_generate_api_keys(opts = {})
82
- data, _status_code, _headers = merchants_generate_api_keys_with_http_info(opts)
83
- data
84
- end
85
-
86
- # Rotate Whop API Keys
87
- # Generate and sync a new Whop Child Company API key (restricted to business owners).
88
- # @param [Hash] opts the optional parameters
89
- # @return [Array<(WhopApiKeysRotation, Integer, Hash)>] WhopApiKeysRotation data, response status code and response headers
90
- def merchants_generate_api_keys_with_http_info(opts = {})
91
- if @api_client.config.debugging
92
- @api_client.config.logger.debug 'Calling API: BusinessesApi.merchants_generate_api_keys ...'
93
- end
94
- # resource path
95
- local_var_path = '/v1/user/whop-api-keys'
96
-
97
- # query parameters
98
- query_params = opts[:query_params] || {}
99
-
100
- # header parameters
101
- header_params = opts[:header_params] || {}
102
- # HTTP header 'Accept' (if needed)
103
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
104
-
105
- # form parameters
106
- form_params = opts[:form_params] || {}
107
-
108
- # http body (model)
109
- post_body = opts[:debug_body]
110
-
111
- # return_type
112
- return_type = opts[:debug_return_type] || 'WhopApiKeysRotation'
113
-
114
- # auth_names
115
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
116
-
117
- new_options = opts.merge(
118
- :operation => :"BusinessesApi.merchants_generate_api_keys",
119
- :header_params => header_params,
120
- :query_params => query_params,
121
- :form_params => form_params,
122
- :body => post_body,
123
- :auth_names => auth_names,
124
- :return_type => return_type
125
- )
126
-
127
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
128
- if @api_client.config.debugging
129
- @api_client.config.logger.debug "API called: BusinessesApi#merchants_generate_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
- end
131
- return data, status_code, headers
132
- end
133
-
134
- # Update Page configuration
135
- # Modify store page content configs, banner images, or avatar details.
136
- # @param user_theme_update [UserThemeUpdate]
137
- # @param [Hash] opts the optional parameters
138
- # @return [UserPage]
139
- def merchants_update_page(user_theme_update, opts = {})
140
- data, _status_code, _headers = merchants_update_page_with_http_info(user_theme_update, opts)
141
- data
142
- end
143
-
144
- # Update Page configuration
145
- # Modify store page content configs, banner images, or avatar details.
146
- # @param user_theme_update [UserThemeUpdate]
147
- # @param [Hash] opts the optional parameters
148
- # @return [Array<(UserPage, Integer, Hash)>] UserPage data, response status code and response headers
149
- def merchants_update_page_with_http_info(user_theme_update, opts = {})
150
- if @api_client.config.debugging
151
- @api_client.config.logger.debug 'Calling API: BusinessesApi.merchants_update_page ...'
152
- end
153
- # verify the required parameter 'user_theme_update' is set
154
- if @api_client.config.client_side_validation && user_theme_update.nil?
155
- fail ArgumentError, "Missing the required parameter 'user_theme_update' when calling BusinessesApi.merchants_update_page"
156
- end
157
- # resource path
158
- local_var_path = '/v1/user/page'
159
-
160
- # query parameters
161
- query_params = opts[:query_params] || {}
162
-
163
- # header parameters
164
- header_params = opts[:header_params] || {}
165
- # HTTP header 'Accept' (if needed)
166
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
167
- # HTTP header 'Content-Type'
168
- content_type = @api_client.select_header_content_type(['application/json'])
169
- if !content_type.nil?
170
- header_params['Content-Type'] = content_type
171
- end
172
-
173
- # form parameters
174
- form_params = opts[:form_params] || {}
175
-
176
- # http body (model)
177
- post_body = opts[:debug_body] || @api_client.object_to_http_body(user_theme_update)
178
-
179
- # return_type
180
- return_type = opts[:debug_return_type] || 'UserPage'
181
-
182
- # auth_names
183
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
184
-
185
- new_options = opts.merge(
186
- :operation => :"BusinessesApi.merchants_update_page",
187
- :header_params => header_params,
188
- :query_params => query_params,
189
- :form_params => form_params,
190
- :body => post_body,
191
- :auth_names => auth_names,
192
- :return_type => return_type
193
- )
194
-
195
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
196
- if @api_client.config.debugging
197
- @api_client.config.logger.debug "API called: BusinessesApi#merchants_update_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
- end
199
- return data, status_code, headers
200
- end
201
-
202
- # Update Merchant Settings
203
- # Update profile parameters, SEO, Google analytics, and email notification properties.
204
- # @param user_settings_update [UserSettingsUpdate]
205
- # @param [Hash] opts the optional parameters
206
- # @return [UserSettings]
207
- def merchants_update_settings(user_settings_update, opts = {})
208
- data, _status_code, _headers = merchants_update_settings_with_http_info(user_settings_update, opts)
209
- data
210
- end
211
-
212
- # Update Merchant Settings
213
- # Update profile parameters, SEO, Google analytics, and email notification properties.
214
- # @param user_settings_update [UserSettingsUpdate]
215
- # @param [Hash] opts the optional parameters
216
- # @return [Array<(UserSettings, Integer, Hash)>] UserSettings data, response status code and response headers
217
- def merchants_update_settings_with_http_info(user_settings_update, opts = {})
218
- if @api_client.config.debugging
219
- @api_client.config.logger.debug 'Calling API: BusinessesApi.merchants_update_settings ...'
220
- end
221
- # verify the required parameter 'user_settings_update' is set
222
- if @api_client.config.client_side_validation && user_settings_update.nil?
223
- fail ArgumentError, "Missing the required parameter 'user_settings_update' when calling BusinessesApi.merchants_update_settings"
224
- end
225
- # resource path
226
- local_var_path = '/v1/user/settings'
227
-
228
- # query parameters
229
- query_params = opts[:query_params] || {}
230
-
231
- # header parameters
232
- header_params = opts[:header_params] || {}
233
- # HTTP header 'Accept' (if needed)
234
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
235
- # HTTP header 'Content-Type'
236
- content_type = @api_client.select_header_content_type(['application/json'])
237
- if !content_type.nil?
238
- header_params['Content-Type'] = content_type
239
- end
240
-
241
- # form parameters
242
- form_params = opts[:form_params] || {}
243
-
244
- # http body (model)
245
- post_body = opts[:debug_body] || @api_client.object_to_http_body(user_settings_update)
246
-
247
- # return_type
248
- return_type = opts[:debug_return_type] || 'UserSettings'
249
-
250
- # auth_names
251
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
252
-
253
- new_options = opts.merge(
254
- :operation => :"BusinessesApi.merchants_update_settings",
255
- :header_params => header_params,
256
- :query_params => query_params,
257
- :form_params => form_params,
258
- :body => post_body,
259
- :auth_names => auth_names,
260
- :return_type => return_type
261
- )
262
-
263
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
264
- if @api_client.config.debugging
265
- @api_client.config.logger.debug "API called: BusinessesApi#merchants_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
- end
267
- return data, status_code, headers
268
- end
269
-
270
- # Update Theme
271
- # Update colors, fonts, avatar, or banner settings for the store.
272
- # @param user_theme_update [UserThemeUpdate]
273
- # @param [Hash] opts the optional parameters
274
- # @return [UserTheme]
275
- def merchants_update_theme(user_theme_update, opts = {})
276
- data, _status_code, _headers = merchants_update_theme_with_http_info(user_theme_update, opts)
277
- data
278
- end
279
-
280
- # Update Theme
281
- # Update colors, fonts, avatar, or banner settings for the store.
282
- # @param user_theme_update [UserThemeUpdate]
283
- # @param [Hash] opts the optional parameters
284
- # @return [Array<(UserTheme, Integer, Hash)>] UserTheme data, response status code and response headers
285
- def merchants_update_theme_with_http_info(user_theme_update, opts = {})
286
- if @api_client.config.debugging
287
- @api_client.config.logger.debug 'Calling API: BusinessesApi.merchants_update_theme ...'
288
- end
289
- # verify the required parameter 'user_theme_update' is set
290
- if @api_client.config.client_side_validation && user_theme_update.nil?
291
- fail ArgumentError, "Missing the required parameter 'user_theme_update' when calling BusinessesApi.merchants_update_theme"
292
- end
293
- # resource path
294
- local_var_path = '/v1/user/theme'
295
-
296
- # query parameters
297
- query_params = opts[:query_params] || {}
298
-
299
- # header parameters
300
- header_params = opts[:header_params] || {}
301
- # HTTP header 'Accept' (if needed)
302
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
303
- # HTTP header 'Content-Type'
304
- content_type = @api_client.select_header_content_type(['application/json'])
305
- if !content_type.nil?
306
- header_params['Content-Type'] = content_type
307
- end
308
-
309
- # form parameters
310
- form_params = opts[:form_params] || {}
311
-
312
- # http body (model)
313
- post_body = opts[:debug_body] || @api_client.object_to_http_body(user_theme_update)
314
-
315
- # return_type
316
- return_type = opts[:debug_return_type] || 'UserTheme'
317
-
318
- # auth_names
319
- auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
320
-
321
- new_options = opts.merge(
322
- :operation => :"BusinessesApi.merchants_update_theme",
323
- :header_params => header_params,
324
- :query_params => query_params,
325
- :form_params => form_params,
326
- :body => post_body,
327
- :auth_names => auth_names,
328
- :return_type => return_type
329
- )
330
-
331
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
332
- if @api_client.config.debugging
333
- @api_client.config.logger.debug "API called: BusinessesApi#merchants_update_theme\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
334
- end
335
- return data, status_code, headers
336
- end
337
- end
338
- end