tremendous_ruby 5.24.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 +14 -6
- data/lib/tremendous/models/campaign_base.rb +14 -6
- 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 +14 -6
- 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 +13 -9
- 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 +7 -11
- data/lib/tremendous/models/delivery_details_with_link.rb +13 -9
- 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 +14 -6
- data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_auto_add_product_rule.rb +301 -0
- 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 +7 -11
- 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 +13 -9
- data/lib/tremendous/models/reward_without_link_delivery.rb +7 -11
- data/lib/tremendous/models/single_reward_order_reward_delivery.rb +4 -6
- 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 +14 -6
- data/lib/tremendous/models/update_campaign_request.rb +14 -6
- 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 +7 -0
- metadata +22 -8
- data/lib/tremendous/models/create_order201_response.rb +0 -221
|
@@ -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
|
|
@@ -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,76 +14,83 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Tremendous
|
|
17
|
-
#
|
|
18
|
-
class
|
|
19
|
-
#
|
|
20
|
-
attr_accessor :
|
|
21
|
-
|
|
22
|
-
# Status of this report <table> <thead> <tr> <th>Status</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>CREATED</code></td> <td>Report has been created</td> </tr> <tr> <td><code>PROCESSING</code></td> <td>Report is currently being generated</td> </tr> <tr> <td><code>READY_FOR_DOWNLOAD</code></td> <td>Report generation is complete and ready for download</td> </tr> <tr> <td><code>FAILED</code></td> <td>Report failed to generate</td> </tr> </tbody> </table>
|
|
23
|
-
attr_accessor :status
|
|
24
|
-
|
|
25
|
-
# Timestamp of when the report was created
|
|
26
|
-
attr_accessor :created_at
|
|
27
|
-
|
|
28
|
-
# Timestamp of when the report is expected to finish generating. If the report is complete, this will return the time the report completed generating at.
|
|
29
|
-
attr_accessor :expected_completion_at
|
|
30
|
-
|
|
31
|
-
# URL to download the report. Only returned when the report generation is complete and report is ready for download. URL is valid for 7 days from generation completion
|
|
32
|
-
attr_accessor :url
|
|
33
|
-
|
|
34
|
-
class EnumAttributeValidator
|
|
35
|
-
attr_reader :datatype
|
|
36
|
-
attr_reader :allowable_values
|
|
37
|
-
|
|
38
|
-
def initialize(datatype, allowable_values)
|
|
39
|
-
@allowable_values = allowable_values.map do |value|
|
|
40
|
-
case datatype.to_s
|
|
41
|
-
when /Integer/i
|
|
42
|
-
value.to_i
|
|
43
|
-
when /Float/i
|
|
44
|
-
value.to_f
|
|
45
|
-
else
|
|
46
|
-
value
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
17
|
+
# Optional KYB details to forward for the end client. When provided, these values prefill the end client's onboarding form. Every field is optional.
|
|
18
|
+
class CreateConnectedOrganizationRequestKybPrefill
|
|
19
|
+
# The registered legal name of the company.
|
|
20
|
+
attr_accessor :company_name
|
|
50
21
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
22
|
+
# The trade name (DBA) the company operates under, if different from its legal name.
|
|
23
|
+
attr_accessor :doing_business_as
|
|
24
|
+
|
|
25
|
+
# The company's legal entity type. Free-form text; any value is accepted. Common values include `Sole proprietorship`, `Corporation (Inc)`, `Limited liability company (LLC)`, `Limited liability partnership (LLP)`, `Public limited company (PLC)`, and `Private limited company (LTD)`.
|
|
26
|
+
attr_accessor :company_structure
|
|
27
|
+
|
|
28
|
+
# The company's tax ID or registration number.
|
|
29
|
+
attr_accessor :company_registration_number
|
|
30
|
+
|
|
31
|
+
# The ISO 3166-1 alpha-2 country code of the company. Must be a supported country.
|
|
32
|
+
attr_accessor :country_code
|
|
33
|
+
|
|
34
|
+
# The company's website URL. Must be a well-formed URL.
|
|
35
|
+
attr_accessor :website_url
|
|
36
|
+
|
|
37
|
+
# The company's street address.
|
|
38
|
+
attr_accessor :address_1
|
|
39
|
+
|
|
40
|
+
# The company's city.
|
|
41
|
+
attr_accessor :city
|
|
42
|
+
|
|
43
|
+
# The company's state or province.
|
|
44
|
+
attr_accessor :state
|
|
45
|
+
|
|
46
|
+
# The company's ZIP or postal code.
|
|
47
|
+
attr_accessor :postal_code
|
|
55
48
|
|
|
56
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
57
50
|
def self.attribute_map
|
|
58
51
|
{
|
|
59
|
-
:'
|
|
60
|
-
:'
|
|
61
|
-
:'
|
|
62
|
-
:'
|
|
63
|
-
:'
|
|
52
|
+
:'company_name' => :'company_name',
|
|
53
|
+
:'doing_business_as' => :'doing_business_as',
|
|
54
|
+
:'company_structure' => :'company_structure',
|
|
55
|
+
:'company_registration_number' => :'company_registration_number',
|
|
56
|
+
:'country_code' => :'country_code',
|
|
57
|
+
:'website_url' => :'website_url',
|
|
58
|
+
:'address_1' => :'address_1',
|
|
59
|
+
:'city' => :'city',
|
|
60
|
+
:'state' => :'state',
|
|
61
|
+
:'postal_code' => :'postal_code'
|
|
64
62
|
}
|
|
65
63
|
end
|
|
66
64
|
|
|
65
|
+
# Returns attribute mapping this model knows about
|
|
66
|
+
def self.acceptable_attribute_map
|
|
67
|
+
attribute_map
|
|
68
|
+
end
|
|
69
|
+
|
|
67
70
|
# Returns all the JSON keys this model knows about
|
|
68
71
|
def self.acceptable_attributes
|
|
69
|
-
|
|
72
|
+
acceptable_attribute_map.values
|
|
70
73
|
end
|
|
71
74
|
|
|
72
75
|
# Attribute type mapping.
|
|
73
76
|
def self.openapi_types
|
|
74
77
|
{
|
|
75
|
-
:'
|
|
76
|
-
:'
|
|
77
|
-
:'
|
|
78
|
-
:'
|
|
79
|
-
:'
|
|
78
|
+
:'company_name' => :'String',
|
|
79
|
+
:'doing_business_as' => :'String',
|
|
80
|
+
:'company_structure' => :'String',
|
|
81
|
+
:'company_registration_number' => :'String',
|
|
82
|
+
:'country_code' => :'String',
|
|
83
|
+
:'website_url' => :'String',
|
|
84
|
+
:'address_1' => :'String',
|
|
85
|
+
:'city' => :'String',
|
|
86
|
+
:'state' => :'String',
|
|
87
|
+
:'postal_code' => :'String'
|
|
80
88
|
}
|
|
81
89
|
end
|
|
82
90
|
|
|
83
91
|
# List of attributes with nullable: true
|
|
84
92
|
def self.openapi_nullable
|
|
85
93
|
Set.new([
|
|
86
|
-
:'url'
|
|
87
94
|
])
|
|
88
95
|
end
|
|
89
96
|
|
|
@@ -91,35 +98,56 @@ module Tremendous
|
|
|
91
98
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
92
99
|
def initialize(attributes = {})
|
|
93
100
|
if (!attributes.is_a?(Hash))
|
|
94
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::
|
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::CreateConnectedOrganizationRequestKybPrefill` initialize method"
|
|
95
102
|
end
|
|
96
103
|
|
|
97
104
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
98
106
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
99
|
-
if (!
|
|
100
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::
|
|
107
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
108
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateConnectedOrganizationRequestKybPrefill`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
101
109
|
end
|
|
102
110
|
h[k.to_sym] = v
|
|
103
111
|
}
|
|
104
112
|
|
|
105
|
-
if attributes.key?(:'
|
|
106
|
-
self.
|
|
113
|
+
if attributes.key?(:'company_name')
|
|
114
|
+
self.company_name = attributes[:'company_name']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'doing_business_as')
|
|
118
|
+
self.doing_business_as = attributes[:'doing_business_as']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'company_structure')
|
|
122
|
+
self.company_structure = attributes[:'company_structure']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'company_registration_number')
|
|
126
|
+
self.company_registration_number = attributes[:'company_registration_number']
|
|
107
127
|
end
|
|
108
128
|
|
|
109
|
-
if attributes.key?(:'
|
|
110
|
-
self.
|
|
129
|
+
if attributes.key?(:'country_code')
|
|
130
|
+
self.country_code = attributes[:'country_code']
|
|
111
131
|
end
|
|
112
132
|
|
|
113
|
-
if attributes.key?(:'
|
|
114
|
-
self.
|
|
133
|
+
if attributes.key?(:'website_url')
|
|
134
|
+
self.website_url = attributes[:'website_url']
|
|
115
135
|
end
|
|
116
136
|
|
|
117
|
-
if attributes.key?(:'
|
|
118
|
-
self.
|
|
137
|
+
if attributes.key?(:'address_1')
|
|
138
|
+
self.address_1 = attributes[:'address_1']
|
|
119
139
|
end
|
|
120
140
|
|
|
121
|
-
if attributes.key?(:'
|
|
122
|
-
self.
|
|
141
|
+
if attributes.key?(:'city')
|
|
142
|
+
self.city = attributes[:'city']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'state')
|
|
146
|
+
self.state = attributes[:'state']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'postal_code')
|
|
150
|
+
self.postal_code = attributes[:'postal_code']
|
|
123
151
|
end
|
|
124
152
|
end
|
|
125
153
|
|
|
@@ -135,31 +163,24 @@ module Tremendous
|
|
|
135
163
|
# @return true if the model is valid
|
|
136
164
|
def valid?
|
|
137
165
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
138
|
-
status_validator = EnumAttributeValidator.new('String', ["CREATED", "PROCESSING", "READY_FOR_DOWNLOAD", "FAILED"])
|
|
139
|
-
return false unless status_validator.valid?(@status)
|
|
140
166
|
true
|
|
141
167
|
end
|
|
142
168
|
|
|
143
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
144
|
-
# @param [Object] status Object to be assigned
|
|
145
|
-
def status=(status)
|
|
146
|
-
validator = EnumAttributeValidator.new('String', ["CREATED", "PROCESSING", "READY_FOR_DOWNLOAD", "FAILED"])
|
|
147
|
-
unless validator.valid?(status)
|
|
148
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
149
|
-
end
|
|
150
|
-
@status = status
|
|
151
|
-
end
|
|
152
|
-
|
|
153
169
|
# Checks equality by comparing each attribute.
|
|
154
170
|
# @param [Object] Object to be compared
|
|
155
171
|
def ==(o)
|
|
156
172
|
return true if self.equal?(o)
|
|
157
173
|
self.class == o.class &&
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
174
|
+
company_name == o.company_name &&
|
|
175
|
+
doing_business_as == o.doing_business_as &&
|
|
176
|
+
company_structure == o.company_structure &&
|
|
177
|
+
company_registration_number == o.company_registration_number &&
|
|
178
|
+
country_code == o.country_code &&
|
|
179
|
+
website_url == o.website_url &&
|
|
180
|
+
address_1 == o.address_1 &&
|
|
181
|
+
city == o.city &&
|
|
182
|
+
state == o.state &&
|
|
183
|
+
postal_code == o.postal_code
|
|
163
184
|
end
|
|
164
185
|
|
|
165
186
|
# @see the `==` method
|
|
@@ -171,7 +192,7 @@ module Tremendous
|
|
|
171
192
|
# Calculates hash code according to all attributes.
|
|
172
193
|
# @return [Integer] Hash code
|
|
173
194
|
def hash
|
|
174
|
-
[
|
|
195
|
+
[company_name, doing_business_as, company_structure, company_registration_number, country_code, website_url, address_1, city, state, postal_code].hash
|
|
175
196
|
end
|
|
176
197
|
|
|
177
198
|
# Builds the object from hash
|
|
@@ -169,13 +169,15 @@ module Tremendous
|
|
|
169
169
|
@display_name = display_name
|
|
170
170
|
end
|
|
171
171
|
|
|
172
|
-
# Custom attribute writer method
|
|
172
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
173
|
+
# so that enum values added to the API don't break deserialization on
|
|
174
|
+
# older versions of this gem.
|
|
173
175
|
# @param [Object] data_type Object to be assigned
|
|
174
176
|
def data_type=(data_type)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
fail ArgumentError, "invalid value for \"data_type\", must be one of #{validator.allowable_values}."
|
|
177
|
+
if data_type.nil?
|
|
178
|
+
fail ArgumentError, 'data_type cannot be nil'
|
|
178
179
|
end
|
|
180
|
+
|
|
179
181
|
@data_type = data_type
|
|
180
182
|
end
|
|
181
183
|
|
|
@@ -169,13 +169,15 @@ module Tremendous
|
|
|
169
169
|
@display_name = display_name
|
|
170
170
|
end
|
|
171
171
|
|
|
172
|
-
# Custom attribute writer method
|
|
172
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
173
|
+
# so that enum values added to the API don't break deserialization on
|
|
174
|
+
# older versions of this gem.
|
|
173
175
|
# @param [Object] data_type Object to be assigned
|
|
174
176
|
def data_type=(data_type)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
fail ArgumentError, "invalid value for \"data_type\", must be one of #{validator.allowable_values}."
|
|
177
|
+
if data_type.nil?
|
|
178
|
+
fail ArgumentError, 'data_type cannot be nil'
|
|
178
179
|
end
|
|
180
|
+
|
|
179
181
|
@data_type = data_type
|
|
180
182
|
end
|
|
181
183
|
|
|
@@ -165,23 +165,19 @@ module Tremendous
|
|
|
165
165
|
@amount = amount
|
|
166
166
|
end
|
|
167
167
|
|
|
168
|
-
# Custom attribute writer method
|
|
168
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
169
|
+
# so that enum values added to the API don't break deserialization on
|
|
170
|
+
# older versions of this gem.
|
|
169
171
|
# @param [Object] currency_code Object to be assigned
|
|
170
172
|
def currency_code=(currency_code)
|
|
171
|
-
validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
172
|
-
unless validator.valid?(currency_code)
|
|
173
|
-
fail ArgumentError, "invalid value for \"currency_code\", must be one of #{validator.allowable_values}."
|
|
174
|
-
end
|
|
175
173
|
@currency_code = currency_code
|
|
176
174
|
end
|
|
177
175
|
|
|
178
|
-
# Custom attribute writer method
|
|
176
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
177
|
+
# so that enum values added to the API don't break deserialization on
|
|
178
|
+
# older versions of this gem.
|
|
179
179
|
# @param [Object] currency Object to be assigned
|
|
180
180
|
def currency=(currency)
|
|
181
|
-
validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP"])
|
|
182
|
-
unless validator.valid?(currency)
|
|
183
|
-
fail ArgumentError, "invalid value for \"currency\", must be one of #{validator.allowable_values}."
|
|
184
|
-
end
|
|
185
181
|
@currency = currency
|
|
186
182
|
end
|
|
187
183
|
|
|
@@ -254,23 +254,23 @@ module Tremendous
|
|
|
254
254
|
@created_at = created_at
|
|
255
255
|
end
|
|
256
256
|
|
|
257
|
-
# Custom attribute writer method
|
|
257
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
258
|
+
# so that enum values added to the API don't break deserialization on
|
|
259
|
+
# older versions of this gem.
|
|
258
260
|
# @param [Object] status Object to be assigned
|
|
259
261
|
def status=(status)
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
262
|
+
if status.nil?
|
|
263
|
+
fail ArgumentError, 'status cannot be nil'
|
|
263
264
|
end
|
|
265
|
+
|
|
264
266
|
@status = status
|
|
265
267
|
end
|
|
266
268
|
|
|
267
|
-
# Custom attribute writer method
|
|
269
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
270
|
+
# so that enum values added to the API don't break deserialization on
|
|
271
|
+
# older versions of this gem.
|
|
268
272
|
# @param [Object] channel Object to be assigned
|
|
269
273
|
def channel=(channel)
|
|
270
|
-
validator = EnumAttributeValidator.new('String', ["UI", "API", "EMBED", "DECIPHER", "QUALTRICS", "TYPEFORM", "SURVEY MONKEY", "YOTPO"])
|
|
271
|
-
unless validator.valid?(channel)
|
|
272
|
-
fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
|
|
273
|
-
end
|
|
274
274
|
@channel = channel
|
|
275
275
|
end
|
|
276
276
|
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
# Details on how the reward is delivered to the recipient.
|
|
18
18
|
class CreateOrder200ResponseOrderRewardsInnerDelivery
|
|
19
|
-
# How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The
|
|
19
|
+
# How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
|
|
20
20
|
attr_accessor :method
|
|
21
21
|
|
|
22
22
|
# Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link active). * `PENDING` - Delivery is pending but not yet scheduled.
|
|
@@ -143,23 +143,27 @@ module Tremendous
|
|
|
143
143
|
true
|
|
144
144
|
end
|
|
145
145
|
|
|
146
|
-
# Custom attribute writer method
|
|
146
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
147
|
+
# so that enum values added to the API don't break deserialization on
|
|
148
|
+
# older versions of this gem.
|
|
147
149
|
# @param [Object] method Object to be assigned
|
|
148
150
|
def method=(method)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
|
|
151
|
+
if method.nil?
|
|
152
|
+
fail ArgumentError, 'method cannot be nil'
|
|
152
153
|
end
|
|
154
|
+
|
|
153
155
|
@method = method
|
|
154
156
|
end
|
|
155
157
|
|
|
156
|
-
# Custom attribute writer method
|
|
158
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
159
|
+
# so that enum values added to the API don't break deserialization on
|
|
160
|
+
# older versions of this gem.
|
|
157
161
|
# @param [Object] status Object to be assigned
|
|
158
162
|
def status=(status)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
163
|
+
if status.nil?
|
|
164
|
+
fail ArgumentError, 'status cannot be nil'
|
|
162
165
|
end
|
|
166
|
+
|
|
163
167
|
@status = status
|
|
164
168
|
end
|
|
165
169
|
|
|
@@ -146,13 +146,11 @@ module Tremendous
|
|
|
146
146
|
true
|
|
147
147
|
end
|
|
148
148
|
|
|
149
|
-
# Custom attribute writer method
|
|
149
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
150
|
+
# so that enum values added to the API don't break deserialization on
|
|
151
|
+
# older versions of this gem.
|
|
150
152
|
# @param [Object] status Object to be assigned
|
|
151
153
|
def status=(status)
|
|
152
|
-
validator = EnumAttributeValidator.new('String', ["CREATED", "PROCESSING", "READY_FOR_DOWNLOAD", "FAILED"])
|
|
153
|
-
unless validator.valid?(status)
|
|
154
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
155
|
-
end
|
|
156
154
|
@status = status
|
|
157
155
|
end
|
|
158
156
|
|
|
@@ -142,23 +142,27 @@ module Tremendous
|
|
|
142
142
|
true
|
|
143
143
|
end
|
|
144
144
|
|
|
145
|
-
# Custom attribute writer method
|
|
145
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
146
|
+
# so that enum values added to the API don't break deserialization on
|
|
147
|
+
# older versions of this gem.
|
|
146
148
|
# @param [Object] report_type Object to be assigned
|
|
147
149
|
def report_type=(report_type)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
fail ArgumentError, "invalid value for \"report_type\", must be one of #{validator.allowable_values}."
|
|
150
|
+
if report_type.nil?
|
|
151
|
+
fail ArgumentError, 'report_type cannot be nil'
|
|
151
152
|
end
|
|
153
|
+
|
|
152
154
|
@report_type = report_type
|
|
153
155
|
end
|
|
154
156
|
|
|
155
|
-
# Custom attribute writer method
|
|
157
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
158
|
+
# so that enum values added to the API don't break deserialization on
|
|
159
|
+
# older versions of this gem.
|
|
156
160
|
# @param [Object] format Object to be assigned
|
|
157
161
|
def format=(format)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
fail ArgumentError, "invalid value for \"format\", must be one of #{validator.allowable_values}."
|
|
162
|
+
if format.nil?
|
|
163
|
+
fail ArgumentError, 'format cannot be nil'
|
|
161
164
|
end
|
|
165
|
+
|
|
162
166
|
@format = format
|
|
163
167
|
end
|
|
164
168
|
|
|
@@ -182,23 +182,19 @@ module Tremendous
|
|
|
182
182
|
true
|
|
183
183
|
end
|
|
184
184
|
|
|
185
|
-
# Custom attribute writer method
|
|
185
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
186
|
+
# so that enum values added to the API don't break deserialization on
|
|
187
|
+
# older versions of this gem.
|
|
186
188
|
# @param [Object] delivery_method Object to be assigned
|
|
187
189
|
def delivery_method=(delivery_method)
|
|
188
|
-
validator = EnumAttributeValidator.new('String', ["phone", "email", "link", "mail", "direct"])
|
|
189
|
-
unless validator.valid?(delivery_method)
|
|
190
|
-
fail ArgumentError, "invalid value for \"delivery_method\", must be one of #{validator.allowable_values}."
|
|
191
|
-
end
|
|
192
190
|
@delivery_method = delivery_method
|
|
193
191
|
end
|
|
194
192
|
|
|
195
|
-
# Custom attribute writer method
|
|
193
|
+
# Custom attribute writer method for enum attributes. Any value is accepted
|
|
194
|
+
# so that enum values added to the API don't break deserialization on
|
|
195
|
+
# older versions of this gem.
|
|
196
196
|
# @param [Object] order_status Object to be assigned
|
|
197
197
|
def order_status=(order_status)
|
|
198
|
-
validator = EnumAttributeValidator.new('String', ["executed", "canceled", "failed", "pending_approval"])
|
|
199
|
-
unless validator.valid?(order_status)
|
|
200
|
-
fail ArgumentError, "invalid value for \"order_status\", must be one of #{validator.allowable_values}."
|
|
201
|
-
end
|
|
202
198
|
@order_status = order_status
|
|
203
199
|
end
|
|
204
200
|
|