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.
- checksums.yaml +4 -4
- data/LICENSE +202 -0
- data/README.md +6 -10
- data/docs/AffiliateApi.md +845 -0
- data/docs/BillingApi.md +68 -0
- data/docs/BrandsApi.md +286 -0
- data/docs/Business.md +56 -0
- data/docs/BusinessCreate.md +18 -0
- data/docs/BusinessFullCreate.md +26 -0
- data/docs/BusinessFullCreateResponse.md +20 -0
- data/docs/BusinessesApi.md +350 -0
- data/docs/ChatApi.md +246 -0
- data/docs/CollectionProductDto.md +0 -6
- data/docs/CommunityApi.md +497 -0
- data/docs/DefaultApi.md +0 -284
- data/docs/EntitlementGrantResponseDto.md +0 -8
- data/docs/PartnerApi.md +125 -0
- data/docs/PayoutAccessToken.md +20 -0
- data/docs/PayoutAccount.md +22 -0
- data/docs/PayoutAccountLink.md +20 -0
- data/docs/PayoutMethod.md +24 -0
- data/docs/PayoutMethodList.md +18 -0
- data/docs/PayoutVerification.md +24 -0
- data/docs/PayoutVerificationList.md +18 -0
- data/docs/PayoutsApi.md +579 -0
- data/docs/Product.md +0 -6
- data/docs/ProductCreate.md +0 -6
- data/docs/ProductUpdate.md +0 -6
- data/docs/TicketApi.md +318 -0
- data/docs/UserPage.md +26 -0
- data/docs/UserProfileThemesApi.md +345 -0
- data/docs/UserSettings.md +34 -0
- data/docs/UserSettingsUpdate.md +76 -0
- data/docs/UserStats.md +20 -0
- data/docs/UserTheme.md +26 -0
- data/docs/UserThemeUpdate.md +22 -0
- data/docs/WhopApiKeysRotation.md +18 -0
- data/docs/Withdrawal.md +46 -0
- data/docs/WithdrawalCreate.md +22 -0
- data/docs/WithdrawalList.md +20 -0
- data/git_push.sh +2 -2
- data/lib/solifyn/api/affiliate_api.rb +760 -0
- data/lib/solifyn/api/billing_api.rb +77 -0
- data/lib/solifyn/api/brands_api.rb +284 -0
- data/lib/solifyn/api/businesses_api.rb +338 -0
- data/lib/solifyn/api/chat_api.rb +232 -0
- data/lib/solifyn/api/community_api.rb +466 -0
- data/lib/solifyn/api/default_api.rb +0 -248
- data/lib/solifyn/api/{discord_integration_api.rb → partner_api.rb} +19 -32
- data/lib/solifyn/api/payouts_api.rb +520 -0
- data/lib/solifyn/api/ticket_api.rb +328 -0
- data/lib/solifyn/api/user_profile_themes_api.rb +313 -0
- data/lib/solifyn/models/business.rb +482 -0
- data/lib/solifyn/models/business_create.rb +241 -0
- data/lib/solifyn/models/business_full_create.rb +288 -0
- data/lib/solifyn/models/business_full_create_response.rb +239 -0
- data/lib/solifyn/models/collection_product_dto.rb +1 -52
- data/lib/solifyn/models/entitlement_grant_response_dto.rb +1 -41
- data/lib/solifyn/models/payout_access_token.rb +239 -0
- data/lib/solifyn/models/payout_account.rb +249 -0
- data/lib/solifyn/models/payout_account_link.rb +239 -0
- data/lib/solifyn/models/{discord_roles_response_dto.rb → payout_method.rb} +34 -41
- data/lib/solifyn/models/payout_method_list.rb +224 -0
- data/lib/solifyn/models/{webhook_entitlement_grant_payload.rb → payout_verification.rb} +41 -118
- data/lib/solifyn/models/payout_verification_list.rb +224 -0
- data/lib/solifyn/models/product.rb +1 -52
- data/lib/solifyn/models/product_create.rb +1 -33
- data/lib/solifyn/models/product_update.rb +1 -33
- data/lib/solifyn/models/user_page.rb +290 -0
- data/lib/solifyn/models/user_settings.rb +337 -0
- data/lib/solifyn/models/user_settings_update.rb +505 -0
- data/lib/solifyn/models/user_stats.rb +241 -0
- data/lib/solifyn/models/user_theme.rb +276 -0
- data/lib/solifyn/models/user_theme_update.rb +235 -0
- data/lib/solifyn/models/whop_api_keys_rotation.rb +222 -0
- data/lib/solifyn/models/withdrawal.rb +411 -0
- data/lib/solifyn/models/withdrawal_create.rb +249 -0
- data/lib/solifyn/models/withdrawal_list.rb +241 -0
- data/lib/solifyn/version.rb +1 -1
- data/lib/solifyn.rb +0 -3
- data/spec/api/affiliate_api_spec.rb +165 -0
- data/spec/api/billing_api_spec.rb +46 -0
- data/spec/api/brands_api_spec.rb +83 -0
- data/spec/api/businesses_api_spec.rb +93 -0
- data/spec/api/chat_api_spec.rb +72 -0
- data/spec/api/checkout_api_spec.rb +0 -12
- data/spec/api/community_api_spec.rb +113 -0
- data/spec/api/default_api_spec.rb +11 -59
- data/spec/api/developer_api_spec.rb +29 -52
- data/spec/api/{discord_integration_api_spec.rb → partner_api_spec.rb} +11 -16
- data/spec/api/payouts_api_spec.rb +133 -0
- data/spec/api/ticket_api_spec.rb +86 -0
- data/spec/api/user_profile_themes_api_spec.rb +91 -0
- data/spec/models/business_create_spec.rb +36 -0
- data/spec/models/business_full_create_response_spec.rb +42 -0
- data/spec/models/business_full_create_spec.rb +60 -0
- data/spec/models/business_spec.rb +150 -0
- data/spec/models/checkout_session_details_dto_spec.rb +0 -6
- data/spec/models/collection_product_dto_spec.rb +0 -28
- data/spec/models/order_spec.rb +0 -6
- data/spec/models/payout_access_token_spec.rb +42 -0
- data/spec/models/payout_account_link_spec.rb +42 -0
- data/spec/models/payout_account_spec.rb +48 -0
- data/spec/models/payout_method_list_spec.rb +36 -0
- data/spec/models/{discord_roles_response_dto_spec.rb → payout_method_spec.rb} +9 -9
- data/spec/models/payout_verification_list_spec.rb +36 -0
- data/spec/models/payout_verification_spec.rb +54 -0
- data/spec/models/product_create_spec.rb +0 -28
- data/spec/models/product_spec.rb +0 -28
- data/spec/models/product_update_spec.rb +0 -28
- data/spec/models/user_page_spec.rb +60 -0
- data/spec/models/user_settings_spec.rb +84 -0
- data/spec/models/user_settings_update_spec.rb +210 -0
- data/spec/models/user_stats_spec.rb +42 -0
- data/spec/models/user_theme_spec.rb +60 -0
- data/spec/models/user_theme_update_spec.rb +48 -0
- data/spec/models/whop_api_keys_rotation_spec.rb +36 -0
- data/spec/models/withdrawal_create_spec.rb +48 -0
- data/spec/models/withdrawal_list_spec.rb +42 -0
- data/spec/models/{webhook_entitlement_grant_payload_spec.rb → withdrawal_spec.rb} +23 -17
- metadata +258 -145
- data/docs/DiscordIntegrationApi.md +0 -135
- data/docs/DiscordRolesResponseDto.md +0 -24
- data/docs/WebhookEntitlementGrantPayload.md +0 -44
|
@@ -0,0 +1,239 @@
|
|
|
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 BusinessFullCreateResponse
|
|
18
|
+
# Indicates if creation was successful
|
|
19
|
+
attr_accessor :success
|
|
20
|
+
|
|
21
|
+
# The newly created business ID
|
|
22
|
+
attr_accessor :business_id
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'success' => :'success',
|
|
28
|
+
:'business_id' => :'businessId'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'success' => :'Boolean',
|
|
41
|
+
:'business_id' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Solifyn::BusinessFullCreateResponse` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Solifyn::BusinessFullCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'success')
|
|
67
|
+
self.success = attributes[:'success']
|
|
68
|
+
else
|
|
69
|
+
self.success = nil
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'business_id')
|
|
73
|
+
self.business_id = attributes[:'business_id']
|
|
74
|
+
else
|
|
75
|
+
self.business_id = nil
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
if @success.nil?
|
|
85
|
+
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if @business_id.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "business_id", business_id cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
99
|
+
return false if @success.nil?
|
|
100
|
+
return false if @business_id.nil?
|
|
101
|
+
true
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
success == o.success &&
|
|
110
|
+
business_id == o.business_id
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see the `==` method
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def eql?(o)
|
|
116
|
+
self == o
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Calculates hash code according to all attributes.
|
|
120
|
+
# @return [Integer] Hash code
|
|
121
|
+
def hash
|
|
122
|
+
[success, business_id].hash
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Builds the object from hash
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
# @return [Object] Returns the model itself
|
|
128
|
+
def self.build_from_hash(attributes)
|
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
131
|
+
transformed_hash = {}
|
|
132
|
+
openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = nil
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
new(transformed_hash)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Deserializes the data based on type
|
|
149
|
+
# @param string type Data type
|
|
150
|
+
# @param string value Value to be deserialized
|
|
151
|
+
# @return [Object] Deserialized data
|
|
152
|
+
def self._deserialize(type, value)
|
|
153
|
+
case type.to_sym
|
|
154
|
+
when :Time
|
|
155
|
+
Time.parse(value)
|
|
156
|
+
when :Date
|
|
157
|
+
Date.parse(value)
|
|
158
|
+
when :String
|
|
159
|
+
value.to_s
|
|
160
|
+
when :Integer
|
|
161
|
+
value.to_i
|
|
162
|
+
when :Float
|
|
163
|
+
value.to_f
|
|
164
|
+
when :Boolean
|
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
166
|
+
true
|
|
167
|
+
else
|
|
168
|
+
false
|
|
169
|
+
end
|
|
170
|
+
when :Object
|
|
171
|
+
# generic object (usually a Hash), return directly
|
|
172
|
+
value
|
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
|
179
|
+
{}.tap do |hash|
|
|
180
|
+
value.each do |k, v|
|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
else # model
|
|
185
|
+
# models (e.g. Pet) or oneOf
|
|
186
|
+
klass = Solifyn.const_get(type)
|
|
187
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Returns the string representation of the object
|
|
192
|
+
# @return [String] String presentation of the object
|
|
193
|
+
def to_s
|
|
194
|
+
to_hash.to_s
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
|
199
|
+
def to_body
|
|
200
|
+
to_hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Returns the object in the form of hash
|
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
|
205
|
+
def to_hash
|
|
206
|
+
hash = {}
|
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
208
|
+
value = self.send(attr)
|
|
209
|
+
if value.nil?
|
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
hash[param] = _to_hash(value)
|
|
215
|
+
end
|
|
216
|
+
hash
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Outputs non-array value in the form of hash
|
|
220
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
221
|
+
# @param [Object] value Any valid value
|
|
222
|
+
# @return [Hash] Returns the value in the form of hash
|
|
223
|
+
def _to_hash(value)
|
|
224
|
+
if value.is_a?(Array)
|
|
225
|
+
value.compact.map { |v| _to_hash(v) }
|
|
226
|
+
elsif value.is_a?(Hash)
|
|
227
|
+
{}.tap do |hash|
|
|
228
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
229
|
+
end
|
|
230
|
+
elsif value.respond_to? :to_hash
|
|
231
|
+
value.to_hash
|
|
232
|
+
else
|
|
233
|
+
value
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
end
|
|
@@ -60,15 +60,6 @@ module Solifyn
|
|
|
60
60
|
# GitHub collaborator permission level.
|
|
61
61
|
attr_accessor :github_permission
|
|
62
62
|
|
|
63
|
-
# Whether the product includes Discord role access.
|
|
64
|
-
attr_accessor :has_discord_access
|
|
65
|
-
|
|
66
|
-
# Discord Guild (Server) ID to grant access to.
|
|
67
|
-
attr_accessor :discord_guild_id
|
|
68
|
-
|
|
69
|
-
# Discord Role ID to assign to the user.
|
|
70
|
-
attr_accessor :discord_role_id
|
|
71
|
-
|
|
72
63
|
# Whether the product price already includes applicable sales taxes.
|
|
73
64
|
attr_accessor :is_tax_inclusive
|
|
74
65
|
|
|
@@ -175,9 +166,6 @@ module Solifyn
|
|
|
175
166
|
:'has_github_access' => :'hasGithubAccess',
|
|
176
167
|
:'github_repo' => :'githubRepo',
|
|
177
168
|
:'github_permission' => :'githubPermission',
|
|
178
|
-
:'has_discord_access' => :'hasDiscordAccess',
|
|
179
|
-
:'discord_guild_id' => :'discordGuildId',
|
|
180
|
-
:'discord_role_id' => :'discordRoleId',
|
|
181
169
|
:'is_tax_inclusive' => :'isTaxInclusive',
|
|
182
170
|
:'billing_period' => :'billingPeriod',
|
|
183
171
|
:'trial_period_days' => :'trialPeriodDays',
|
|
@@ -226,9 +214,6 @@ module Solifyn
|
|
|
226
214
|
:'has_github_access' => :'Boolean',
|
|
227
215
|
:'github_repo' => :'String',
|
|
228
216
|
:'github_permission' => :'String',
|
|
229
|
-
:'has_discord_access' => :'Boolean',
|
|
230
|
-
:'discord_guild_id' => :'String',
|
|
231
|
-
:'discord_role_id' => :'String',
|
|
232
217
|
:'is_tax_inclusive' => :'Boolean',
|
|
233
218
|
:'billing_period' => :'Integer',
|
|
234
219
|
:'trial_period_days' => :'Integer',
|
|
@@ -363,24 +348,6 @@ module Solifyn
|
|
|
363
348
|
self.github_permission = nil
|
|
364
349
|
end
|
|
365
350
|
|
|
366
|
-
if attributes.key?(:'has_discord_access')
|
|
367
|
-
self.has_discord_access = attributes[:'has_discord_access']
|
|
368
|
-
else
|
|
369
|
-
self.has_discord_access = nil
|
|
370
|
-
end
|
|
371
|
-
|
|
372
|
-
if attributes.key?(:'discord_guild_id')
|
|
373
|
-
self.discord_guild_id = attributes[:'discord_guild_id']
|
|
374
|
-
else
|
|
375
|
-
self.discord_guild_id = nil
|
|
376
|
-
end
|
|
377
|
-
|
|
378
|
-
if attributes.key?(:'discord_role_id')
|
|
379
|
-
self.discord_role_id = attributes[:'discord_role_id']
|
|
380
|
-
else
|
|
381
|
-
self.discord_role_id = nil
|
|
382
|
-
end
|
|
383
|
-
|
|
384
351
|
if attributes.key?(:'is_tax_inclusive')
|
|
385
352
|
self.is_tax_inclusive = attributes[:'is_tax_inclusive']
|
|
386
353
|
else
|
|
@@ -579,18 +546,6 @@ module Solifyn
|
|
|
579
546
|
invalid_properties.push('invalid value for "github_permission", github_permission cannot be nil.')
|
|
580
547
|
end
|
|
581
548
|
|
|
582
|
-
if @has_discord_access.nil?
|
|
583
|
-
invalid_properties.push('invalid value for "has_discord_access", has_discord_access cannot be nil.')
|
|
584
|
-
end
|
|
585
|
-
|
|
586
|
-
if @discord_guild_id.nil?
|
|
587
|
-
invalid_properties.push('invalid value for "discord_guild_id", discord_guild_id cannot be nil.')
|
|
588
|
-
end
|
|
589
|
-
|
|
590
|
-
if @discord_role_id.nil?
|
|
591
|
-
invalid_properties.push('invalid value for "discord_role_id", discord_role_id cannot be nil.')
|
|
592
|
-
end
|
|
593
|
-
|
|
594
549
|
if @is_tax_inclusive.nil?
|
|
595
550
|
invalid_properties.push('invalid value for "is_tax_inclusive", is_tax_inclusive cannot be nil.')
|
|
596
551
|
end
|
|
@@ -706,9 +661,6 @@ module Solifyn
|
|
|
706
661
|
return false if @github_permission.nil?
|
|
707
662
|
github_permission_validator = EnumAttributeValidator.new('String', ["pull", "triage", "push", "maintain", "admin"])
|
|
708
663
|
return false unless github_permission_validator.valid?(@github_permission)
|
|
709
|
-
return false if @has_discord_access.nil?
|
|
710
|
-
return false if @discord_guild_id.nil?
|
|
711
|
-
return false if @discord_role_id.nil?
|
|
712
664
|
return false if @is_tax_inclusive.nil?
|
|
713
665
|
return false if @billing_period.nil?
|
|
714
666
|
return false if @trial_period_days.nil?
|
|
@@ -784,9 +736,6 @@ module Solifyn
|
|
|
784
736
|
has_github_access == o.has_github_access &&
|
|
785
737
|
github_repo == o.github_repo &&
|
|
786
738
|
github_permission == o.github_permission &&
|
|
787
|
-
has_discord_access == o.has_discord_access &&
|
|
788
|
-
discord_guild_id == o.discord_guild_id &&
|
|
789
|
-
discord_role_id == o.discord_role_id &&
|
|
790
739
|
is_tax_inclusive == o.is_tax_inclusive &&
|
|
791
740
|
billing_period == o.billing_period &&
|
|
792
741
|
trial_period_days == o.trial_period_days &&
|
|
@@ -820,7 +769,7 @@ module Solifyn
|
|
|
820
769
|
# Calculates hash code according to all attributes.
|
|
821
770
|
# @return [Integer] Hash code
|
|
822
771
|
def hash
|
|
823
|
-
[id, name, price, currency, description, status, image_url, tax_category, pricing_type, discount, has_license_key, has_digital_delivery, has_github_access, github_repo, github_permission,
|
|
772
|
+
[id, name, price, currency, description, status, image_url, tax_category, pricing_type, discount, has_license_key, has_digital_delivery, has_github_access, github_repo, github_permission, is_tax_inclusive, billing_period, trial_period_days, expiration_days, statement_descriptor, pay_what_you_want, metadata, custom_fields, stock, activation_limit, is_listed, is_free, created_at, updated_at, is_permanently_deleted, brand_id, digital_link, instructions, activation_message, expiry_hours, business_id, quantity].hash
|
|
824
773
|
end
|
|
825
774
|
|
|
826
775
|
# Builds the object from hash
|
|
@@ -42,18 +42,6 @@ module Solifyn
|
|
|
42
42
|
# The connected customer GitHub username.
|
|
43
43
|
attr_accessor :github_username
|
|
44
44
|
|
|
45
|
-
# Target Discord Guild ID if type is DISCORD.
|
|
46
|
-
attr_accessor :discord_guild_id
|
|
47
|
-
|
|
48
|
-
# Target Discord Role ID if type is DISCORD.
|
|
49
|
-
attr_accessor :discord_role_id
|
|
50
|
-
|
|
51
|
-
# The connected customer Discord username.
|
|
52
|
-
attr_accessor :discord_username
|
|
53
|
-
|
|
54
|
-
# The connected customer Discord user ID.
|
|
55
|
-
attr_accessor :discord_user_id
|
|
56
|
-
|
|
57
45
|
# Delivery status of the collaborator invite (PENDING, DELIVERED, FAILED, REVOKED).
|
|
58
46
|
attr_accessor :status
|
|
59
47
|
|
|
@@ -84,10 +72,6 @@ module Solifyn
|
|
|
84
72
|
:'github_repo' => :'githubRepo',
|
|
85
73
|
:'github_permission' => :'githubPermission',
|
|
86
74
|
:'github_username' => :'githubUsername',
|
|
87
|
-
:'discord_guild_id' => :'discordGuildId',
|
|
88
|
-
:'discord_role_id' => :'discordRoleId',
|
|
89
|
-
:'discord_username' => :'discordUsername',
|
|
90
|
-
:'discord_user_id' => :'discordUserId',
|
|
91
75
|
:'status' => :'status',
|
|
92
76
|
:'oauth_url' => :'oauthUrl',
|
|
93
77
|
:'error_details' => :'errorDetails',
|
|
@@ -114,10 +98,6 @@ module Solifyn
|
|
|
114
98
|
:'github_repo' => :'String',
|
|
115
99
|
:'github_permission' => :'String',
|
|
116
100
|
:'github_username' => :'String',
|
|
117
|
-
:'discord_guild_id' => :'String',
|
|
118
|
-
:'discord_role_id' => :'String',
|
|
119
|
-
:'discord_username' => :'String',
|
|
120
|
-
:'discord_user_id' => :'String',
|
|
121
101
|
:'status' => :'String',
|
|
122
102
|
:'oauth_url' => :'String',
|
|
123
103
|
:'error_details' => :'String',
|
|
@@ -194,22 +174,6 @@ module Solifyn
|
|
|
194
174
|
self.github_username = attributes[:'github_username']
|
|
195
175
|
end
|
|
196
176
|
|
|
197
|
-
if attributes.key?(:'discord_guild_id')
|
|
198
|
-
self.discord_guild_id = attributes[:'discord_guild_id']
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
if attributes.key?(:'discord_role_id')
|
|
202
|
-
self.discord_role_id = attributes[:'discord_role_id']
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
if attributes.key?(:'discord_username')
|
|
206
|
-
self.discord_username = attributes[:'discord_username']
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
if attributes.key?(:'discord_user_id')
|
|
210
|
-
self.discord_user_id = attributes[:'discord_user_id']
|
|
211
|
-
end
|
|
212
|
-
|
|
213
177
|
if attributes.key?(:'status')
|
|
214
178
|
self.status = attributes[:'status']
|
|
215
179
|
else
|
|
@@ -310,10 +274,6 @@ module Solifyn
|
|
|
310
274
|
github_repo == o.github_repo &&
|
|
311
275
|
github_permission == o.github_permission &&
|
|
312
276
|
github_username == o.github_username &&
|
|
313
|
-
discord_guild_id == o.discord_guild_id &&
|
|
314
|
-
discord_role_id == o.discord_role_id &&
|
|
315
|
-
discord_username == o.discord_username &&
|
|
316
|
-
discord_user_id == o.discord_user_id &&
|
|
317
277
|
status == o.status &&
|
|
318
278
|
oauth_url == o.oauth_url &&
|
|
319
279
|
error_details == o.error_details &&
|
|
@@ -331,7 +291,7 @@ module Solifyn
|
|
|
331
291
|
# Calculates hash code according to all attributes.
|
|
332
292
|
# @return [Integer] Hash code
|
|
333
293
|
def hash
|
|
334
|
-
[id, business_id, customer_id, payment_id, product_id, type, github_repo, github_permission, github_username,
|
|
294
|
+
[id, business_id, customer_id, payment_id, product_id, type, github_repo, github_permission, github_username, status, oauth_url, error_details, metadata, created_at, updated_at].hash
|
|
335
295
|
end
|
|
336
296
|
|
|
337
297
|
# Builds the object from hash
|
|
@@ -0,0 +1,239 @@
|
|
|
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 PayoutAccessToken
|
|
18
|
+
# The temporary access token for embed portals
|
|
19
|
+
attr_accessor :access_token
|
|
20
|
+
|
|
21
|
+
# Expiration timestamp of the access token
|
|
22
|
+
attr_accessor :expires_at
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'access_token' => :'access_token',
|
|
28
|
+
:'expires_at' => :'expires_at'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'access_token' => :'String',
|
|
41
|
+
:'expires_at' => :'Time'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Solifyn::PayoutAccessToken` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Solifyn::PayoutAccessToken`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'access_token')
|
|
67
|
+
self.access_token = attributes[:'access_token']
|
|
68
|
+
else
|
|
69
|
+
self.access_token = nil
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'expires_at')
|
|
73
|
+
self.expires_at = attributes[:'expires_at']
|
|
74
|
+
else
|
|
75
|
+
self.expires_at = nil
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
if @access_token.nil?
|
|
85
|
+
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if @expires_at.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
99
|
+
return false if @access_token.nil?
|
|
100
|
+
return false if @expires_at.nil?
|
|
101
|
+
true
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
access_token == o.access_token &&
|
|
110
|
+
expires_at == o.expires_at
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see the `==` method
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def eql?(o)
|
|
116
|
+
self == o
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Calculates hash code according to all attributes.
|
|
120
|
+
# @return [Integer] Hash code
|
|
121
|
+
def hash
|
|
122
|
+
[access_token, expires_at].hash
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Builds the object from hash
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
# @return [Object] Returns the model itself
|
|
128
|
+
def self.build_from_hash(attributes)
|
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
131
|
+
transformed_hash = {}
|
|
132
|
+
openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = nil
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
new(transformed_hash)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Deserializes the data based on type
|
|
149
|
+
# @param string type Data type
|
|
150
|
+
# @param string value Value to be deserialized
|
|
151
|
+
# @return [Object] Deserialized data
|
|
152
|
+
def self._deserialize(type, value)
|
|
153
|
+
case type.to_sym
|
|
154
|
+
when :Time
|
|
155
|
+
Time.parse(value)
|
|
156
|
+
when :Date
|
|
157
|
+
Date.parse(value)
|
|
158
|
+
when :String
|
|
159
|
+
value.to_s
|
|
160
|
+
when :Integer
|
|
161
|
+
value.to_i
|
|
162
|
+
when :Float
|
|
163
|
+
value.to_f
|
|
164
|
+
when :Boolean
|
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
166
|
+
true
|
|
167
|
+
else
|
|
168
|
+
false
|
|
169
|
+
end
|
|
170
|
+
when :Object
|
|
171
|
+
# generic object (usually a Hash), return directly
|
|
172
|
+
value
|
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
|
179
|
+
{}.tap do |hash|
|
|
180
|
+
value.each do |k, v|
|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
else # model
|
|
185
|
+
# models (e.g. Pet) or oneOf
|
|
186
|
+
klass = Solifyn.const_get(type)
|
|
187
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Returns the string representation of the object
|
|
192
|
+
# @return [String] String presentation of the object
|
|
193
|
+
def to_s
|
|
194
|
+
to_hash.to_s
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
|
199
|
+
def to_body
|
|
200
|
+
to_hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Returns the object in the form of hash
|
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
|
205
|
+
def to_hash
|
|
206
|
+
hash = {}
|
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
208
|
+
value = self.send(attr)
|
|
209
|
+
if value.nil?
|
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
hash[param] = _to_hash(value)
|
|
215
|
+
end
|
|
216
|
+
hash
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Outputs non-array value in the form of hash
|
|
220
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
221
|
+
# @param [Object] value Any valid value
|
|
222
|
+
# @return [Hash] Returns the value in the form of hash
|
|
223
|
+
def _to_hash(value)
|
|
224
|
+
if value.is_a?(Array)
|
|
225
|
+
value.compact.map { |v| _to_hash(v) }
|
|
226
|
+
elsif value.is_a?(Hash)
|
|
227
|
+
{}.tap do |hash|
|
|
228
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
229
|
+
end
|
|
230
|
+
elsif value.respond_to? :to_hash
|
|
231
|
+
value.to_hash
|
|
232
|
+
else
|
|
233
|
+
value
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
end
|