solifyn 1.0.5 → 1.0.7

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 (124) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +202 -0
  3. data/README.md +6 -10
  4. data/docs/AffiliateApi.md +845 -0
  5. data/docs/BillingApi.md +68 -0
  6. data/docs/BrandsApi.md +286 -0
  7. data/docs/Business.md +56 -0
  8. data/docs/BusinessCreate.md +18 -0
  9. data/docs/BusinessFullCreate.md +26 -0
  10. data/docs/BusinessFullCreateResponse.md +20 -0
  11. data/docs/BusinessesApi.md +350 -0
  12. data/docs/ChatApi.md +246 -0
  13. data/docs/CollectionProductDto.md +0 -6
  14. data/docs/CommunityApi.md +497 -0
  15. data/docs/DefaultApi.md +0 -284
  16. data/docs/EntitlementGrantResponseDto.md +0 -8
  17. data/docs/PartnerApi.md +125 -0
  18. data/docs/PayoutAccessToken.md +20 -0
  19. data/docs/PayoutAccount.md +22 -0
  20. data/docs/PayoutAccountLink.md +20 -0
  21. data/docs/PayoutMethod.md +24 -0
  22. data/docs/PayoutMethodList.md +18 -0
  23. data/docs/PayoutVerification.md +24 -0
  24. data/docs/PayoutVerificationList.md +18 -0
  25. data/docs/PayoutsApi.md +579 -0
  26. data/docs/Product.md +0 -6
  27. data/docs/ProductCreate.md +0 -6
  28. data/docs/ProductUpdate.md +0 -6
  29. data/docs/TicketApi.md +318 -0
  30. data/docs/UserPage.md +26 -0
  31. data/docs/UserProfileThemesApi.md +345 -0
  32. data/docs/UserSettings.md +34 -0
  33. data/docs/UserSettingsUpdate.md +76 -0
  34. data/docs/UserStats.md +20 -0
  35. data/docs/UserTheme.md +26 -0
  36. data/docs/UserThemeUpdate.md +22 -0
  37. data/docs/WhopApiKeysRotation.md +18 -0
  38. data/docs/Withdrawal.md +46 -0
  39. data/docs/WithdrawalCreate.md +22 -0
  40. data/docs/WithdrawalList.md +20 -0
  41. data/git_push.sh +2 -2
  42. data/lib/solifyn/api/affiliate_api.rb +760 -0
  43. data/lib/solifyn/api/billing_api.rb +77 -0
  44. data/lib/solifyn/api/brands_api.rb +284 -0
  45. data/lib/solifyn/api/businesses_api.rb +338 -0
  46. data/lib/solifyn/api/chat_api.rb +232 -0
  47. data/lib/solifyn/api/community_api.rb +466 -0
  48. data/lib/solifyn/api/default_api.rb +0 -248
  49. data/lib/solifyn/api/{discord_integration_api.rb → partner_api.rb} +19 -32
  50. data/lib/solifyn/api/payouts_api.rb +520 -0
  51. data/lib/solifyn/api/ticket_api.rb +328 -0
  52. data/lib/solifyn/api/user_profile_themes_api.rb +313 -0
  53. data/lib/solifyn/models/business.rb +482 -0
  54. data/lib/solifyn/models/business_create.rb +241 -0
  55. data/lib/solifyn/models/business_full_create.rb +288 -0
  56. data/lib/solifyn/models/business_full_create_response.rb +239 -0
  57. data/lib/solifyn/models/collection_product_dto.rb +1 -52
  58. data/lib/solifyn/models/entitlement_grant_response_dto.rb +1 -41
  59. data/lib/solifyn/models/payout_access_token.rb +239 -0
  60. data/lib/solifyn/models/payout_account.rb +249 -0
  61. data/lib/solifyn/models/payout_account_link.rb +239 -0
  62. data/lib/solifyn/models/{discord_roles_response_dto.rb → payout_method.rb} +34 -41
  63. data/lib/solifyn/models/payout_method_list.rb +224 -0
  64. data/lib/solifyn/models/{webhook_entitlement_grant_payload.rb → payout_verification.rb} +41 -118
  65. data/lib/solifyn/models/payout_verification_list.rb +224 -0
  66. data/lib/solifyn/models/product.rb +1 -52
  67. data/lib/solifyn/models/product_create.rb +1 -33
  68. data/lib/solifyn/models/product_update.rb +1 -33
  69. data/lib/solifyn/models/user_page.rb +290 -0
  70. data/lib/solifyn/models/user_settings.rb +337 -0
  71. data/lib/solifyn/models/user_settings_update.rb +505 -0
  72. data/lib/solifyn/models/user_stats.rb +241 -0
  73. data/lib/solifyn/models/user_theme.rb +276 -0
  74. data/lib/solifyn/models/user_theme_update.rb +235 -0
  75. data/lib/solifyn/models/whop_api_keys_rotation.rb +222 -0
  76. data/lib/solifyn/models/withdrawal.rb +411 -0
  77. data/lib/solifyn/models/withdrawal_create.rb +249 -0
  78. data/lib/solifyn/models/withdrawal_list.rb +241 -0
  79. data/lib/solifyn/version.rb +1 -1
  80. data/lib/solifyn.rb +0 -3
  81. data/spec/api/affiliate_api_spec.rb +165 -0
  82. data/spec/api/billing_api_spec.rb +46 -0
  83. data/spec/api/brands_api_spec.rb +83 -0
  84. data/spec/api/businesses_api_spec.rb +93 -0
  85. data/spec/api/chat_api_spec.rb +72 -0
  86. data/spec/api/checkout_api_spec.rb +0 -12
  87. data/spec/api/community_api_spec.rb +113 -0
  88. data/spec/api/default_api_spec.rb +11 -59
  89. data/spec/api/developer_api_spec.rb +29 -52
  90. data/spec/api/{discord_integration_api_spec.rb → partner_api_spec.rb} +11 -16
  91. data/spec/api/payouts_api_spec.rb +133 -0
  92. data/spec/api/ticket_api_spec.rb +86 -0
  93. data/spec/api/user_profile_themes_api_spec.rb +91 -0
  94. data/spec/models/business_create_spec.rb +36 -0
  95. data/spec/models/business_full_create_response_spec.rb +42 -0
  96. data/spec/models/business_full_create_spec.rb +60 -0
  97. data/spec/models/business_spec.rb +150 -0
  98. data/spec/models/checkout_session_details_dto_spec.rb +0 -6
  99. data/spec/models/collection_product_dto_spec.rb +0 -28
  100. data/spec/models/order_spec.rb +0 -6
  101. data/spec/models/payout_access_token_spec.rb +42 -0
  102. data/spec/models/payout_account_link_spec.rb +42 -0
  103. data/spec/models/payout_account_spec.rb +48 -0
  104. data/spec/models/payout_method_list_spec.rb +36 -0
  105. data/spec/models/{discord_roles_response_dto_spec.rb → payout_method_spec.rb} +9 -9
  106. data/spec/models/payout_verification_list_spec.rb +36 -0
  107. data/spec/models/payout_verification_spec.rb +54 -0
  108. data/spec/models/product_create_spec.rb +0 -28
  109. data/spec/models/product_spec.rb +0 -28
  110. data/spec/models/product_update_spec.rb +0 -28
  111. data/spec/models/user_page_spec.rb +60 -0
  112. data/spec/models/user_settings_spec.rb +84 -0
  113. data/spec/models/user_settings_update_spec.rb +210 -0
  114. data/spec/models/user_stats_spec.rb +42 -0
  115. data/spec/models/user_theme_spec.rb +60 -0
  116. data/spec/models/user_theme_update_spec.rb +48 -0
  117. data/spec/models/whop_api_keys_rotation_spec.rb +36 -0
  118. data/spec/models/withdrawal_create_spec.rb +48 -0
  119. data/spec/models/withdrawal_list_spec.rb +42 -0
  120. data/spec/models/{webhook_entitlement_grant_payload_spec.rb → withdrawal_spec.rb} +23 -17
  121. metadata +258 -145
  122. data/docs/DiscordIntegrationApi.md +0 -135
  123. data/docs/DiscordRolesResponseDto.md +0 -24
  124. data/docs/WebhookEntitlementGrantPayload.md +0 -44
@@ -0,0 +1,337 @@
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 'date'
14
+ require 'time'
15
+
16
+ module Solifyn
17
+ class UserSettings
18
+ # User ID
19
+ attr_accessor :id
20
+
21
+ # Primary email address
22
+ attr_accessor :email
23
+
24
+ # First name
25
+ attr_accessor :first_name
26
+
27
+ # Last name
28
+ attr_accessor :last_name
29
+
30
+ # Profile avatar image URL
31
+ attr_accessor :avatar_url
32
+
33
+ # Auto-payout minimum threshold limit in cents
34
+ attr_accessor :payout_threshold
35
+
36
+ # Auto-email receipt toggled
37
+ attr_accessor :notify_on_success
38
+
39
+ # Send license keys email automatically
40
+ attr_accessor :send_license_key_email
41
+
42
+ # Send digital delivery download link emails automatically
43
+ attr_accessor :send_digital_file_email
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'id' => :'id',
49
+ :'email' => :'email',
50
+ :'first_name' => :'firstName',
51
+ :'last_name' => :'lastName',
52
+ :'avatar_url' => :'avatarUrl',
53
+ :'payout_threshold' => :'payoutThreshold',
54
+ :'notify_on_success' => :'notifyOnSuccess',
55
+ :'send_license_key_email' => :'sendLicenseKeyEmail',
56
+ :'send_digital_file_email' => :'sendDigitalFileEmail'
57
+ }
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'id' => :'String',
69
+ :'email' => :'String',
70
+ :'first_name' => :'String',
71
+ :'last_name' => :'String',
72
+ :'avatar_url' => :'String',
73
+ :'payout_threshold' => :'Float',
74
+ :'notify_on_success' => :'Boolean',
75
+ :'send_license_key_email' => :'Boolean',
76
+ :'send_digital_file_email' => :'Boolean'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ if (!attributes.is_a?(Hash))
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Solifyn::UserSettings` initialize method"
91
+ end
92
+
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h|
95
+ if (!self.class.attribute_map.key?(k.to_sym))
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Solifyn::UserSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
+ end
98
+ h[k.to_sym] = v
99
+ }
100
+
101
+ if attributes.key?(:'id')
102
+ self.id = attributes[:'id']
103
+ else
104
+ self.id = nil
105
+ end
106
+
107
+ if attributes.key?(:'email')
108
+ self.email = attributes[:'email']
109
+ else
110
+ self.email = nil
111
+ end
112
+
113
+ if attributes.key?(:'first_name')
114
+ self.first_name = attributes[:'first_name']
115
+ end
116
+
117
+ if attributes.key?(:'last_name')
118
+ self.last_name = attributes[:'last_name']
119
+ end
120
+
121
+ if attributes.key?(:'avatar_url')
122
+ self.avatar_url = attributes[:'avatar_url']
123
+ end
124
+
125
+ if attributes.key?(:'payout_threshold')
126
+ self.payout_threshold = attributes[:'payout_threshold']
127
+ else
128
+ self.payout_threshold = nil
129
+ end
130
+
131
+ if attributes.key?(:'notify_on_success')
132
+ self.notify_on_success = attributes[:'notify_on_success']
133
+ else
134
+ self.notify_on_success = nil
135
+ end
136
+
137
+ if attributes.key?(:'send_license_key_email')
138
+ self.send_license_key_email = attributes[:'send_license_key_email']
139
+ else
140
+ self.send_license_key_email = nil
141
+ end
142
+
143
+ if attributes.key?(:'send_digital_file_email')
144
+ self.send_digital_file_email = attributes[:'send_digital_file_email']
145
+ else
146
+ self.send_digital_file_email = nil
147
+ end
148
+ end
149
+
150
+ # Show invalid properties with the reasons. Usually used together with valid?
151
+ # @return Array for valid properties with the reasons
152
+ def list_invalid_properties
153
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
154
+ invalid_properties = Array.new
155
+ if @id.nil?
156
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
157
+ end
158
+
159
+ if @email.nil?
160
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
161
+ end
162
+
163
+ if @payout_threshold.nil?
164
+ invalid_properties.push('invalid value for "payout_threshold", payout_threshold cannot be nil.')
165
+ end
166
+
167
+ if @notify_on_success.nil?
168
+ invalid_properties.push('invalid value for "notify_on_success", notify_on_success cannot be nil.')
169
+ end
170
+
171
+ if @send_license_key_email.nil?
172
+ invalid_properties.push('invalid value for "send_license_key_email", send_license_key_email cannot be nil.')
173
+ end
174
+
175
+ if @send_digital_file_email.nil?
176
+ invalid_properties.push('invalid value for "send_digital_file_email", send_digital_file_email cannot be nil.')
177
+ end
178
+
179
+ invalid_properties
180
+ end
181
+
182
+ # Check to see if the all the properties in the model are valid
183
+ # @return true if the model is valid
184
+ def valid?
185
+ warn '[DEPRECATED] the `valid?` method is obsolete'
186
+ return false if @id.nil?
187
+ return false if @email.nil?
188
+ return false if @payout_threshold.nil?
189
+ return false if @notify_on_success.nil?
190
+ return false if @send_license_key_email.nil?
191
+ return false if @send_digital_file_email.nil?
192
+ true
193
+ end
194
+
195
+ # Checks equality by comparing each attribute.
196
+ # @param [Object] Object to be compared
197
+ def ==(o)
198
+ return true if self.equal?(o)
199
+ self.class == o.class &&
200
+ id == o.id &&
201
+ email == o.email &&
202
+ first_name == o.first_name &&
203
+ last_name == o.last_name &&
204
+ avatar_url == o.avatar_url &&
205
+ payout_threshold == o.payout_threshold &&
206
+ notify_on_success == o.notify_on_success &&
207
+ send_license_key_email == o.send_license_key_email &&
208
+ send_digital_file_email == o.send_digital_file_email
209
+ end
210
+
211
+ # @see the `==` method
212
+ # @param [Object] Object to be compared
213
+ def eql?(o)
214
+ self == o
215
+ end
216
+
217
+ # Calculates hash code according to all attributes.
218
+ # @return [Integer] Hash code
219
+ def hash
220
+ [id, email, first_name, last_name, avatar_url, payout_threshold, notify_on_success, send_license_key_email, send_digital_file_email].hash
221
+ end
222
+
223
+ # Builds the object from hash
224
+ # @param [Hash] attributes Model attributes in the form of hash
225
+ # @return [Object] Returns the model itself
226
+ def self.build_from_hash(attributes)
227
+ return nil unless attributes.is_a?(Hash)
228
+ attributes = attributes.transform_keys(&:to_sym)
229
+ transformed_hash = {}
230
+ openapi_types.each_pair do |key, type|
231
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
232
+ transformed_hash["#{key}"] = nil
233
+ elsif type =~ /\AArray<(.*)>/i
234
+ # check to ensure the input is an array given that the attribute
235
+ # is documented as an array but the input is not
236
+ if attributes[attribute_map[key]].is_a?(Array)
237
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
238
+ end
239
+ elsif !attributes[attribute_map[key]].nil?
240
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
241
+ end
242
+ end
243
+ new(transformed_hash)
244
+ end
245
+
246
+ # Deserializes the data based on type
247
+ # @param string type Data type
248
+ # @param string value Value to be deserialized
249
+ # @return [Object] Deserialized data
250
+ def self._deserialize(type, value)
251
+ case type.to_sym
252
+ when :Time
253
+ Time.parse(value)
254
+ when :Date
255
+ Date.parse(value)
256
+ when :String
257
+ value.to_s
258
+ when :Integer
259
+ value.to_i
260
+ when :Float
261
+ value.to_f
262
+ when :Boolean
263
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
264
+ true
265
+ else
266
+ false
267
+ end
268
+ when :Object
269
+ # generic object (usually a Hash), return directly
270
+ value
271
+ when /\AArray<(?<inner_type>.+)>\z/
272
+ inner_type = Regexp.last_match[:inner_type]
273
+ value.map { |v| _deserialize(inner_type, v) }
274
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
275
+ k_type = Regexp.last_match[:k_type]
276
+ v_type = Regexp.last_match[:v_type]
277
+ {}.tap do |hash|
278
+ value.each do |k, v|
279
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
280
+ end
281
+ end
282
+ else # model
283
+ # models (e.g. Pet) or oneOf
284
+ klass = Solifyn.const_get(type)
285
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
286
+ end
287
+ end
288
+
289
+ # Returns the string representation of the object
290
+ # @return [String] String presentation of the object
291
+ def to_s
292
+ to_hash.to_s
293
+ end
294
+
295
+ # to_body is an alias to to_hash (backward compatibility)
296
+ # @return [Hash] Returns the object in the form of hash
297
+ def to_body
298
+ to_hash
299
+ end
300
+
301
+ # Returns the object in the form of hash
302
+ # @return [Hash] Returns the object in the form of hash
303
+ def to_hash
304
+ hash = {}
305
+ self.class.attribute_map.each_pair do |attr, param|
306
+ value = self.send(attr)
307
+ if value.nil?
308
+ is_nullable = self.class.openapi_nullable.include?(attr)
309
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
310
+ end
311
+
312
+ hash[param] = _to_hash(value)
313
+ end
314
+ hash
315
+ end
316
+
317
+ # Outputs non-array value in the form of hash
318
+ # For object, use to_hash. Otherwise, just return the value
319
+ # @param [Object] value Any valid value
320
+ # @return [Hash] Returns the value in the form of hash
321
+ def _to_hash(value)
322
+ if value.is_a?(Array)
323
+ value.compact.map { |v| _to_hash(v) }
324
+ elsif value.is_a?(Hash)
325
+ {}.tap do |hash|
326
+ value.each { |k, v| hash[k] = _to_hash(v) }
327
+ end
328
+ elsif value.respond_to? :to_hash
329
+ value.to_hash
330
+ else
331
+ value
332
+ end
333
+ end
334
+
335
+ end
336
+
337
+ end