tremendous_ruby 5.25.0 → 5.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tremendous/api/tremendous_api.rb +163 -9
- data/lib/tremendous/api_client.rb +3 -2
- data/lib/tremendous/configuration.rb +10 -0
- data/lib/tremendous/models/campaign.rb +3 -5
- data/lib/tremendous/models/campaign_base.rb +3 -5
- data/lib/tremendous/models/connected_organization_member_member.rb +6 -4
- data/lib/tremendous/models/connected_organization_member_session.rb +27 -1
- data/lib/tremendous/models/connected_organization_organization.rb +3 -5
- data/lib/tremendous/models/{generate_reward_token200_response_reward.rb → create_api_key_request.rb} +51 -53
- data/lib/tremendous/models/create_campaign_request.rb +3 -5
- data/lib/tremendous/models/create_connected_organization_member_session200_response_connected_organization_member_session.rb +27 -1
- data/lib/tremendous/models/create_connected_organization_member_session_request.rb +33 -4
- data/lib/tremendous/models/create_connected_organization_request.rb +13 -4
- data/lib/tremendous/models/{create_report201_response_report.rb → create_connected_organization_request_kyb_prefill.rb} +102 -81
- data/lib/tremendous/models/create_field.rb +6 -4
- data/lib/tremendous/models/create_field_request.rb +6 -4
- data/lib/tremendous/models/create_invoice_request.rb +6 -10
- data/lib/tremendous/models/create_order200_response_order.rb +9 -9
- data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +12 -8
- data/lib/tremendous/models/create_report200_response_report.rb +3 -5
- data/lib/tremendous/models/create_report_request.rb +12 -8
- data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +6 -10
- data/lib/tremendous/models/delivery_details.rb +6 -10
- data/lib/tremendous/models/delivery_details_with_link.rb +12 -8
- data/lib/tremendous/models/field.rb +3 -5
- data/lib/tremendous/models/fraud_config_country.rb +6 -4
- data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +6 -4
- data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +6 -4
- data/lib/tremendous/models/{create_campaign201_response.rb → fraud_config_review_vpn.rb} +21 -19
- data/lib/tremendous/models/fraud_review.rb +10 -16
- data/lib/tremendous/models/fraud_review_base.rb +7 -11
- data/lib/tremendous/models/fraud_review_list_item.rb +7 -11
- data/lib/tremendous/models/fraud_review_reason.rb +2 -1
- data/lib/tremendous/models/fraud_rule_request_config.rb +2 -1
- data/lib/tremendous/models/fraud_rules_list_item.rb +4 -6
- data/lib/tremendous/models/funding_source.rb +12 -14
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +10 -16
- data/lib/tremendous/models/get_member200_response_member.rb +6 -4
- data/lib/tremendous/models/get_member200_response_member_events_inner.rb +3 -5
- data/lib/tremendous/models/invoice.rb +12 -14
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +3 -5
- data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner_member.rb +6 -4
- data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner_organization.rb +3 -5
- data/lib/tremendous/models/list_fields200_response_fields_inner.rb +3 -5
- data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +7 -11
- data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +4 -6
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +12 -14
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +6 -10
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +12 -14
- data/lib/tremendous/models/list_members200_response_members_inner.rb +6 -4
- data/lib/tremendous/models/list_orders200_response_orders_inner.rb +9 -9
- data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +3 -5
- data/lib/tremendous/models/list_products_response_products_inner.rb +11 -11
- data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +6 -4
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +6 -10
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +3 -5
- data/lib/tremendous/models/member.rb +6 -4
- data/lib/tremendous/models/member_base.rb +6 -4
- data/lib/tremendous/models/member_with_events.rb +6 -4
- data/lib/tremendous/models/member_without_events.rb +6 -4
- data/lib/tremendous/models/order.rb +9 -9
- data/lib/tremendous/models/order_base.rb +9 -9
- data/lib/tremendous/models/order_with_link.rb +9 -9
- data/lib/tremendous/models/order_without_link.rb +9 -9
- data/lib/tremendous/models/organization.rb +3 -5
- data/lib/tremendous/models/payout.rb +3 -5
- data/lib/tremendous/models/product.rb +11 -11
- data/lib/tremendous/models/report.rb +3 -5
- data/lib/tremendous/models/review_country.rb +6 -4
- data/lib/tremendous/models/review_redeemed_rewards_amount.rb +6 -4
- data/lib/tremendous/models/review_redeemed_rewards_count.rb +6 -4
- data/lib/tremendous/models/{generate_reward_token200_response.rb → review_vpn.rb} +22 -19
- data/lib/tremendous/models/reward_value.rb +3 -5
- data/lib/tremendous/models/reward_with_link_delivery.rb +12 -8
- data/lib/tremendous/models/reward_without_link_delivery.rb +6 -10
- data/lib/tremendous/models/single_reward_order_reward_delivery.rb +3 -5
- data/lib/tremendous/models/single_reward_order_with_link_order.rb +9 -9
- data/lib/tremendous/models/single_reward_order_without_link_order.rb +9 -9
- data/lib/tremendous/models/update_campaign.rb +3 -5
- data/lib/tremendous/models/update_campaign_request.rb +3 -5
- data/lib/tremendous/models/update_fraud_rule_list_request.rb +6 -4
- data/lib/tremendous/models/{get_fraud_review200_response_fraud_review_geo.rb → update_member.rb} +28 -32
- data/lib/tremendous/models/{create_report201_response.rb → update_member_request.rb} +34 -27
- data/lib/tremendous/version.rb +1 -1
- data/lib/tremendous.rb +6 -0
- metadata +21 -8
- data/lib/tremendous/models/create_order201_response.rb +0 -221
|
@@ -24,6 +24,9 @@ module Tremendous
|
|
|
24
24
|
# The URL used for links that redirect the user back to your site when they've completed their actions on Tremendous.
|
|
25
25
|
attr_accessor :return_url
|
|
26
26
|
|
|
27
|
+
# The opaque `state` value provided when the session was created, forwarded on the initial OAuth grant redirect. `null` when no value was set.
|
|
28
|
+
attr_accessor :state
|
|
29
|
+
|
|
27
30
|
# Timestamp of when the session will expire.
|
|
28
31
|
attr_accessor :expires_at
|
|
29
32
|
|
|
@@ -36,6 +39,7 @@ module Tremendous
|
|
|
36
39
|
:'connected_organization_member_id' => :'connected_organization_member_id',
|
|
37
40
|
:'url' => :'url',
|
|
38
41
|
:'return_url' => :'return_url',
|
|
42
|
+
:'state' => :'state',
|
|
39
43
|
:'expires_at' => :'expires_at',
|
|
40
44
|
:'created_at' => :'created_at'
|
|
41
45
|
}
|
|
@@ -57,6 +61,7 @@ module Tremendous
|
|
|
57
61
|
:'connected_organization_member_id' => :'String',
|
|
58
62
|
:'url' => :'String',
|
|
59
63
|
:'return_url' => :'String',
|
|
64
|
+
:'state' => :'String',
|
|
60
65
|
:'expires_at' => :'Time',
|
|
61
66
|
:'created_at' => :'Time'
|
|
62
67
|
}
|
|
@@ -65,6 +70,7 @@ module Tremendous
|
|
|
65
70
|
# List of attributes with nullable: true
|
|
66
71
|
def self.openapi_nullable
|
|
67
72
|
Set.new([
|
|
73
|
+
:'state',
|
|
68
74
|
])
|
|
69
75
|
end
|
|
70
76
|
|
|
@@ -102,6 +108,10 @@ module Tremendous
|
|
|
102
108
|
self.return_url = nil
|
|
103
109
|
end
|
|
104
110
|
|
|
111
|
+
if attributes.key?(:'state')
|
|
112
|
+
self.state = attributes[:'state']
|
|
113
|
+
end
|
|
114
|
+
|
|
105
115
|
if attributes.key?(:'expires_at')
|
|
106
116
|
self.expires_at = attributes[:'expires_at']
|
|
107
117
|
else
|
|
@@ -137,6 +147,10 @@ module Tremendous
|
|
|
137
147
|
invalid_properties.push('invalid value for "return_url", return_url cannot be nil.')
|
|
138
148
|
end
|
|
139
149
|
|
|
150
|
+
if !@state.nil? && @state.to_s.length > 1024
|
|
151
|
+
invalid_properties.push('invalid value for "state", the character length must be smaller than or equal to 1024.')
|
|
152
|
+
end
|
|
153
|
+
|
|
140
154
|
if @expires_at.nil?
|
|
141
155
|
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
142
156
|
end
|
|
@@ -156,6 +170,7 @@ module Tremendous
|
|
|
156
170
|
return false if @connected_organization_member_id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
|
157
171
|
return false if @url.nil?
|
|
158
172
|
return false if @return_url.nil?
|
|
173
|
+
return false if !@state.nil? && @state.to_s.length > 1024
|
|
159
174
|
return false if @expires_at.nil?
|
|
160
175
|
return false if @created_at.nil?
|
|
161
176
|
true
|
|
@@ -196,6 +211,16 @@ module Tremendous
|
|
|
196
211
|
@return_url = return_url
|
|
197
212
|
end
|
|
198
213
|
|
|
214
|
+
# Custom attribute writer method with validation
|
|
215
|
+
# @param [Object] state Value to be assigned
|
|
216
|
+
def state=(state)
|
|
217
|
+
if !state.nil? && state.to_s.length > 1024
|
|
218
|
+
fail ArgumentError, 'invalid value for "state", the character length must be smaller than or equal to 1024.'
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
@state = state
|
|
222
|
+
end
|
|
223
|
+
|
|
199
224
|
# Custom attribute writer method with validation
|
|
200
225
|
# @param [Object] expires_at Value to be assigned
|
|
201
226
|
def expires_at=(expires_at)
|
|
@@ -224,6 +249,7 @@ module Tremendous
|
|
|
224
249
|
connected_organization_member_id == o.connected_organization_member_id &&
|
|
225
250
|
url == o.url &&
|
|
226
251
|
return_url == o.return_url &&
|
|
252
|
+
state == o.state &&
|
|
227
253
|
expires_at == o.expires_at &&
|
|
228
254
|
created_at == o.created_at
|
|
229
255
|
end
|
|
@@ -237,7 +263,7 @@ module Tremendous
|
|
|
237
263
|
# Calculates hash code according to all attributes.
|
|
238
264
|
# @return [Integer] Hash code
|
|
239
265
|
def hash
|
|
240
|
-
[connected_organization_member_id, url, return_url, expires_at, created_at].hash
|
|
266
|
+
[connected_organization_member_id, url, return_url, state, expires_at, created_at].hash
|
|
241
267
|
end
|
|
242
268
|
|
|
243
269
|
# Builds the object from hash
|
|
@@ -208,13 +208,11 @@ module Tremendous
|
|
|
208
208
|
@website = website
|
|
209
209
|
end
|
|
210
210
|
|
|
211
|
-
# Custom attribute writer method
|
|
211
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
212
|
+
# so that enum values added to the API don't break deserialization on
|
|
213
|
+
# older versions of this gem.
|
|
212
214
|
# @param [Object] status Object to be assigned
|
|
213
215
|
def status=(status)
|
|
214
|
-
validator = EnumAttributeValidator.new('String', ["PENDING", "APPROVED", "REJECTED"])
|
|
215
|
-
unless validator.valid?(status)
|
|
216
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
217
|
-
end
|
|
218
216
|
@status = status
|
|
219
217
|
end
|
|
220
218
|
|
data/lib/tremendous/models/{generate_reward_token200_response_reward.rb → create_api_key_request.rb}
RENAMED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 2
|
|
7
7
|
Contact: developers@tremendous.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.12.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,37 +14,53 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
class CreateApiKeyRequest
|
|
18
|
+
# The key's permission level. `read_write` (the default) can make any request. `read_only` keys can't run data-altering requests: they're limited to GET requests and non-writing POST requests, like `/reports`. Omit for `read_write`.
|
|
19
|
+
attr_accessor :permission
|
|
20
|
+
|
|
21
|
+
class EnumAttributeValidator
|
|
22
|
+
attr_reader :datatype
|
|
23
|
+
attr_reader :allowable_values
|
|
24
|
+
|
|
25
|
+
def initialize(datatype, allowable_values)
|
|
26
|
+
@allowable_values = allowable_values.map do |value|
|
|
27
|
+
case datatype.to_s
|
|
28
|
+
when /Integer/i
|
|
29
|
+
value.to_i
|
|
30
|
+
when /Float/i
|
|
31
|
+
value.to_f
|
|
32
|
+
else
|
|
33
|
+
value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
24
37
|
|
|
25
|
-
|
|
26
|
-
|
|
38
|
+
def valid?(value)
|
|
39
|
+
!value || allowable_values.include?(value)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
27
42
|
|
|
28
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
44
|
def self.attribute_map
|
|
30
45
|
{
|
|
31
|
-
:'
|
|
32
|
-
:'token' => :'token',
|
|
33
|
-
:'expires_at' => :'expires_at'
|
|
46
|
+
:'permission' => :'permission'
|
|
34
47
|
}
|
|
35
48
|
end
|
|
36
49
|
|
|
50
|
+
# Returns attribute mapping this model knows about
|
|
51
|
+
def self.acceptable_attribute_map
|
|
52
|
+
attribute_map
|
|
53
|
+
end
|
|
54
|
+
|
|
37
55
|
# Returns all the JSON keys this model knows about
|
|
38
56
|
def self.acceptable_attributes
|
|
39
|
-
|
|
57
|
+
acceptable_attribute_map.values
|
|
40
58
|
end
|
|
41
59
|
|
|
42
60
|
# Attribute type mapping.
|
|
43
61
|
def self.openapi_types
|
|
44
62
|
{
|
|
45
|
-
:'
|
|
46
|
-
:'token' => :'String',
|
|
47
|
-
:'expires_at' => :'Time'
|
|
63
|
+
:'permission' => :'String'
|
|
48
64
|
}
|
|
49
65
|
end
|
|
50
66
|
|
|
@@ -58,27 +74,22 @@ module Tremendous
|
|
|
58
74
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
75
|
def initialize(attributes = {})
|
|
60
76
|
if (!attributes.is_a?(Hash))
|
|
61
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
|
77
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::CreateApiKeyRequest` initialize method"
|
|
62
78
|
end
|
|
63
79
|
|
|
64
80
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
81
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
82
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
-
if (!
|
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
|
83
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateApiKeyRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
85
|
end
|
|
69
86
|
h[k.to_sym] = v
|
|
70
87
|
}
|
|
71
88
|
|
|
72
|
-
if attributes.key?(:'
|
|
73
|
-
self.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if attributes.key?(:'token')
|
|
77
|
-
self.token = attributes[:'token']
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
if attributes.key?(:'expires_at')
|
|
81
|
-
self.expires_at = attributes[:'expires_at']
|
|
89
|
+
if attributes.key?(:'permission')
|
|
90
|
+
self.permission = attributes[:'permission']
|
|
91
|
+
else
|
|
92
|
+
self.permission = 'read_write'
|
|
82
93
|
end
|
|
83
94
|
end
|
|
84
95
|
|
|
@@ -87,11 +98,6 @@ module Tremendous
|
|
|
87
98
|
def list_invalid_properties
|
|
88
99
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
100
|
invalid_properties = Array.new
|
|
90
|
-
pattern = Regexp.new(/[A-Z0-9]{4,20}/)
|
|
91
|
-
if !@id.nil? && @id !~ pattern
|
|
92
|
-
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
|
|
93
|
-
end
|
|
94
|
-
|
|
95
101
|
invalid_properties
|
|
96
102
|
end
|
|
97
103
|
|
|
@@ -99,23 +105,17 @@ module Tremendous
|
|
|
99
105
|
# @return true if the model is valid
|
|
100
106
|
def valid?
|
|
101
107
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
102
|
-
|
|
108
|
+
permission_validator = EnumAttributeValidator.new('String', ["read_write", "read_only"])
|
|
109
|
+
return false unless permission_validator.valid?(@permission)
|
|
103
110
|
true
|
|
104
111
|
end
|
|
105
112
|
|
|
106
|
-
# Custom attribute writer method
|
|
107
|
-
#
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
pattern = Regexp.new(/[A-Z0-9]{4,20}/)
|
|
114
|
-
if id !~ pattern
|
|
115
|
-
fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
@id = id
|
|
113
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
114
|
+
# so that enum values added to the API don't break deserialization on
|
|
115
|
+
# older versions of this gem.
|
|
116
|
+
# @param [Object] permission Object to be assigned
|
|
117
|
+
def permission=(permission)
|
|
118
|
+
@permission = permission
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
# Checks equality by comparing each attribute.
|
|
@@ -123,9 +123,7 @@ module Tremendous
|
|
|
123
123
|
def ==(o)
|
|
124
124
|
return true if self.equal?(o)
|
|
125
125
|
self.class == o.class &&
|
|
126
|
-
|
|
127
|
-
token == o.token &&
|
|
128
|
-
expires_at == o.expires_at
|
|
126
|
+
permission == o.permission
|
|
129
127
|
end
|
|
130
128
|
|
|
131
129
|
# @see the `==` method
|
|
@@ -137,7 +135,7 @@ module Tremendous
|
|
|
137
135
|
# Calculates hash code according to all attributes.
|
|
138
136
|
# @return [Integer] Hash code
|
|
139
137
|
def hash
|
|
140
|
-
[
|
|
138
|
+
[permission].hash
|
|
141
139
|
end
|
|
142
140
|
|
|
143
141
|
# Builds the object from hash
|
|
@@ -201,13 +201,11 @@ module Tremendous
|
|
|
201
201
|
@products = products
|
|
202
202
|
end
|
|
203
203
|
|
|
204
|
-
# Custom attribute writer method
|
|
204
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
205
|
+
# so that enum values added to the API don't break deserialization on
|
|
206
|
+
# older versions of this gem.
|
|
205
207
|
# @param [Object] fee_charged_to Object to be assigned
|
|
206
208
|
def fee_charged_to=(fee_charged_to)
|
|
207
|
-
validator = EnumAttributeValidator.new('String', ["SENDER", "RECIPIENT"])
|
|
208
|
-
unless validator.valid?(fee_charged_to)
|
|
209
|
-
fail ArgumentError, "invalid value for \"fee_charged_to\", must be one of #{validator.allowable_values}."
|
|
210
|
-
end
|
|
211
209
|
@fee_charged_to = fee_charged_to
|
|
212
210
|
end
|
|
213
211
|
|
|
@@ -24,6 +24,9 @@ module Tremendous
|
|
|
24
24
|
# The URL used for links that redirect the user back to your site when they've completed their actions on Tremendous.
|
|
25
25
|
attr_accessor :return_url
|
|
26
26
|
|
|
27
|
+
# The opaque `state` value provided when the session was created, forwarded on the initial OAuth grant redirect. `null` when no value was set.
|
|
28
|
+
attr_accessor :state
|
|
29
|
+
|
|
27
30
|
# Timestamp of when the session will expire.
|
|
28
31
|
attr_accessor :expires_at
|
|
29
32
|
|
|
@@ -36,6 +39,7 @@ module Tremendous
|
|
|
36
39
|
:'connected_organization_member_id' => :'connected_organization_member_id',
|
|
37
40
|
:'url' => :'url',
|
|
38
41
|
:'return_url' => :'return_url',
|
|
42
|
+
:'state' => :'state',
|
|
39
43
|
:'expires_at' => :'expires_at',
|
|
40
44
|
:'created_at' => :'created_at'
|
|
41
45
|
}
|
|
@@ -57,6 +61,7 @@ module Tremendous
|
|
|
57
61
|
:'connected_organization_member_id' => :'String',
|
|
58
62
|
:'url' => :'String',
|
|
59
63
|
:'return_url' => :'String',
|
|
64
|
+
:'state' => :'String',
|
|
60
65
|
:'expires_at' => :'Time',
|
|
61
66
|
:'created_at' => :'Time'
|
|
62
67
|
}
|
|
@@ -65,6 +70,7 @@ module Tremendous
|
|
|
65
70
|
# List of attributes with nullable: true
|
|
66
71
|
def self.openapi_nullable
|
|
67
72
|
Set.new([
|
|
73
|
+
:'state',
|
|
68
74
|
])
|
|
69
75
|
end
|
|
70
76
|
|
|
@@ -102,6 +108,10 @@ module Tremendous
|
|
|
102
108
|
self.return_url = nil
|
|
103
109
|
end
|
|
104
110
|
|
|
111
|
+
if attributes.key?(:'state')
|
|
112
|
+
self.state = attributes[:'state']
|
|
113
|
+
end
|
|
114
|
+
|
|
105
115
|
if attributes.key?(:'expires_at')
|
|
106
116
|
self.expires_at = attributes[:'expires_at']
|
|
107
117
|
else
|
|
@@ -137,6 +147,10 @@ module Tremendous
|
|
|
137
147
|
invalid_properties.push('invalid value for "return_url", return_url cannot be nil.')
|
|
138
148
|
end
|
|
139
149
|
|
|
150
|
+
if !@state.nil? && @state.to_s.length > 1024
|
|
151
|
+
invalid_properties.push('invalid value for "state", the character length must be smaller than or equal to 1024.')
|
|
152
|
+
end
|
|
153
|
+
|
|
140
154
|
if @expires_at.nil?
|
|
141
155
|
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
142
156
|
end
|
|
@@ -156,6 +170,7 @@ module Tremendous
|
|
|
156
170
|
return false if @connected_organization_member_id !~ Regexp.new(/[A-Z0-9]{4,20}/)
|
|
157
171
|
return false if @url.nil?
|
|
158
172
|
return false if @return_url.nil?
|
|
173
|
+
return false if !@state.nil? && @state.to_s.length > 1024
|
|
159
174
|
return false if @expires_at.nil?
|
|
160
175
|
return false if @created_at.nil?
|
|
161
176
|
true
|
|
@@ -196,6 +211,16 @@ module Tremendous
|
|
|
196
211
|
@return_url = return_url
|
|
197
212
|
end
|
|
198
213
|
|
|
214
|
+
# Custom attribute writer method with validation
|
|
215
|
+
# @param [Object] state Value to be assigned
|
|
216
|
+
def state=(state)
|
|
217
|
+
if !state.nil? && state.to_s.length > 1024
|
|
218
|
+
fail ArgumentError, 'invalid value for "state", the character length must be smaller than or equal to 1024.'
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
@state = state
|
|
222
|
+
end
|
|
223
|
+
|
|
199
224
|
# Custom attribute writer method with validation
|
|
200
225
|
# @param [Object] expires_at Value to be assigned
|
|
201
226
|
def expires_at=(expires_at)
|
|
@@ -224,6 +249,7 @@ module Tremendous
|
|
|
224
249
|
connected_organization_member_id == o.connected_organization_member_id &&
|
|
225
250
|
url == o.url &&
|
|
226
251
|
return_url == o.return_url &&
|
|
252
|
+
state == o.state &&
|
|
227
253
|
expires_at == o.expires_at &&
|
|
228
254
|
created_at == o.created_at
|
|
229
255
|
end
|
|
@@ -237,7 +263,7 @@ module Tremendous
|
|
|
237
263
|
# Calculates hash code according to all attributes.
|
|
238
264
|
# @return [Integer] Hash code
|
|
239
265
|
def hash
|
|
240
|
-
[connected_organization_member_id, url, return_url, expires_at, created_at].hash
|
|
266
|
+
[connected_organization_member_id, url, return_url, state, expires_at, created_at].hash
|
|
241
267
|
end
|
|
242
268
|
|
|
243
269
|
# Builds the object from hash
|
|
@@ -18,10 +18,14 @@ module Tremendous
|
|
|
18
18
|
# The URL used for links that redirect the user back to your site when they've completed their actions on Tremendous.
|
|
19
19
|
attr_accessor :return_url
|
|
20
20
|
|
|
21
|
+
# Opaque value forwarded unchanged as the OAuth2 `state` parameter on the initial OAuth grant redirect, letting you round-trip per-user context to your registered OAuth `redirect_uri`. Treat it as untrusted since it travels through the end user's browser: sign it or use it as a lookup key rather than trusting a raw value, and keep it short. Does not change `return_url` behavior.
|
|
22
|
+
attr_accessor :state
|
|
23
|
+
|
|
21
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
25
|
def self.attribute_map
|
|
23
26
|
{
|
|
24
|
-
:'return_url' => :'return_url'
|
|
27
|
+
:'return_url' => :'return_url',
|
|
28
|
+
:'state' => :'state'
|
|
25
29
|
}
|
|
26
30
|
end
|
|
27
31
|
|
|
@@ -38,7 +42,8 @@ module Tremendous
|
|
|
38
42
|
# Attribute type mapping.
|
|
39
43
|
def self.openapi_types
|
|
40
44
|
{
|
|
41
|
-
:'return_url' => :'String'
|
|
45
|
+
:'return_url' => :'String',
|
|
46
|
+
:'state' => :'String'
|
|
42
47
|
}
|
|
43
48
|
end
|
|
44
49
|
|
|
@@ -69,6 +74,10 @@ module Tremendous
|
|
|
69
74
|
else
|
|
70
75
|
self.return_url = nil
|
|
71
76
|
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'state')
|
|
79
|
+
self.state = attributes[:'state']
|
|
80
|
+
end
|
|
72
81
|
end
|
|
73
82
|
|
|
74
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -80,6 +89,10 @@ module Tremendous
|
|
|
80
89
|
invalid_properties.push('invalid value for "return_url", return_url cannot be nil.')
|
|
81
90
|
end
|
|
82
91
|
|
|
92
|
+
if !@state.nil? && @state.to_s.length > 1024
|
|
93
|
+
invalid_properties.push('invalid value for "state", the character length must be smaller than or equal to 1024.')
|
|
94
|
+
end
|
|
95
|
+
|
|
83
96
|
invalid_properties
|
|
84
97
|
end
|
|
85
98
|
|
|
@@ -88,6 +101,7 @@ module Tremendous
|
|
|
88
101
|
def valid?
|
|
89
102
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
103
|
return false if @return_url.nil?
|
|
104
|
+
return false if !@state.nil? && @state.to_s.length > 1024
|
|
91
105
|
true
|
|
92
106
|
end
|
|
93
107
|
|
|
@@ -101,12 +115,27 @@ module Tremendous
|
|
|
101
115
|
@return_url = return_url
|
|
102
116
|
end
|
|
103
117
|
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] state Value to be assigned
|
|
120
|
+
def state=(state)
|
|
121
|
+
if state.nil?
|
|
122
|
+
fail ArgumentError, 'state cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if state.to_s.length > 1024
|
|
126
|
+
fail ArgumentError, 'invalid value for "state", the character length must be smaller than or equal to 1024.'
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
@state = state
|
|
130
|
+
end
|
|
131
|
+
|
|
104
132
|
# Checks equality by comparing each attribute.
|
|
105
133
|
# @param [Object] Object to be compared
|
|
106
134
|
def ==(o)
|
|
107
135
|
return true if self.equal?(o)
|
|
108
136
|
self.class == o.class &&
|
|
109
|
-
return_url == o.return_url
|
|
137
|
+
return_url == o.return_url &&
|
|
138
|
+
state == o.state
|
|
110
139
|
end
|
|
111
140
|
|
|
112
141
|
# @see the `==` method
|
|
@@ -118,7 +147,7 @@ module Tremendous
|
|
|
118
147
|
# Calculates hash code according to all attributes.
|
|
119
148
|
# @return [Integer] Hash code
|
|
120
149
|
def hash
|
|
121
|
-
[return_url].hash
|
|
150
|
+
[return_url, state].hash
|
|
122
151
|
end
|
|
123
152
|
|
|
124
153
|
# Builds the object from hash
|
|
@@ -18,10 +18,13 @@ module Tremendous
|
|
|
18
18
|
# The client ID of the OAuth application.
|
|
19
19
|
attr_accessor :client_id
|
|
20
20
|
|
|
21
|
+
attr_accessor :kyb_prefill
|
|
22
|
+
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
24
|
def self.attribute_map
|
|
23
25
|
{
|
|
24
|
-
:'client_id' => :'client_id'
|
|
26
|
+
:'client_id' => :'client_id',
|
|
27
|
+
:'kyb_prefill' => :'kyb_prefill'
|
|
25
28
|
}
|
|
26
29
|
end
|
|
27
30
|
|
|
@@ -38,7 +41,8 @@ module Tremendous
|
|
|
38
41
|
# Attribute type mapping.
|
|
39
42
|
def self.openapi_types
|
|
40
43
|
{
|
|
41
|
-
:'client_id' => :'String'
|
|
44
|
+
:'client_id' => :'String',
|
|
45
|
+
:'kyb_prefill' => :'CreateConnectedOrganizationRequestKybPrefill'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
44
48
|
|
|
@@ -69,6 +73,10 @@ module Tremendous
|
|
|
69
73
|
else
|
|
70
74
|
self.client_id = nil
|
|
71
75
|
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'kyb_prefill')
|
|
78
|
+
self.kyb_prefill = attributes[:'kyb_prefill']
|
|
79
|
+
end
|
|
72
80
|
end
|
|
73
81
|
|
|
74
82
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -106,7 +114,8 @@ module Tremendous
|
|
|
106
114
|
def ==(o)
|
|
107
115
|
return true if self.equal?(o)
|
|
108
116
|
self.class == o.class &&
|
|
109
|
-
client_id == o.client_id
|
|
117
|
+
client_id == o.client_id &&
|
|
118
|
+
kyb_prefill == o.kyb_prefill
|
|
110
119
|
end
|
|
111
120
|
|
|
112
121
|
# @see the `==` method
|
|
@@ -118,7 +127,7 @@ module Tremendous
|
|
|
118
127
|
# Calculates hash code according to all attributes.
|
|
119
128
|
# @return [Integer] Hash code
|
|
120
129
|
def hash
|
|
121
|
-
[client_id].hash
|
|
130
|
+
[client_id, kyb_prefill].hash
|
|
122
131
|
end
|
|
123
132
|
|
|
124
133
|
# Builds the object from hash
|