tremendous_ruby 6.0.0 → 7.0.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.
@@ -34,6 +34,9 @@ module Tremendous
34
34
  # Currency code for the new organization. Defaults to the current organization's currency if not provided.
35
35
  attr_accessor :currency_code
36
36
 
37
+ # The organization's time zone as a canonical IANA identifier. Returns `null` if not configured.
38
+ attr_accessor :timezone
39
+
37
40
  # Timestamp of when the organization has been created.
38
41
  attr_accessor :created_at
39
42
 
@@ -50,6 +53,7 @@ module Tremendous
50
53
  :'copy_settings' => :'copy_settings',
51
54
  :'phone' => :'phone',
52
55
  :'currency_code' => :'currency_code',
56
+ :'timezone' => :'timezone',
53
57
  :'created_at' => :'created_at',
54
58
  :'api_key' => :'api_key'
55
59
  }
@@ -75,6 +79,7 @@ module Tremendous
75
79
  :'copy_settings' => :'CreateOrganizationRequestCopySettings',
76
80
  :'phone' => :'String',
77
81
  :'currency_code' => :'String',
82
+ :'timezone' => :'String',
78
83
  :'created_at' => :'Date',
79
84
  :'api_key' => :'String'
80
85
  }
@@ -84,6 +89,7 @@ module Tremendous
84
89
  def self.openapi_nullable
85
90
  Set.new([
86
91
  :'phone',
92
+ :'timezone',
87
93
  ])
88
94
  end
89
95
 
@@ -135,6 +141,10 @@ module Tremendous
135
141
  self.currency_code = attributes[:'currency_code']
136
142
  end
137
143
 
144
+ if attributes.key?(:'timezone')
145
+ self.timezone = attributes[:'timezone']
146
+ end
147
+
138
148
  if attributes.key?(:'created_at')
139
149
  self.created_at = attributes[:'created_at']
140
150
  end
@@ -222,6 +232,7 @@ module Tremendous
222
232
  copy_settings == o.copy_settings &&
223
233
  phone == o.phone &&
224
234
  currency_code == o.currency_code &&
235
+ timezone == o.timezone &&
225
236
  created_at == o.created_at &&
226
237
  api_key == o.api_key
227
238
  end
@@ -235,7 +246,7 @@ module Tremendous
235
246
  # Calculates hash code according to all attributes.
236
247
  # @return [Integer] Hash code
237
248
  def hash
238
- [id, name, website, with_api_key, copy_settings, phone, currency_code, created_at, api_key].hash
249
+ [id, name, website, with_api_key, copy_settings, phone, currency_code, timezone, created_at, api_key].hash
239
250
  end
240
251
 
241
252
  # Builds the object from hash
@@ -21,6 +21,9 @@ module Tremendous
21
21
  # Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table>
22
22
  attr_accessor :format
23
23
 
24
+ # Time zone used to interpret date filters and display timestamps in the generated report. Accepts IANA time zone identifiers such as America/New_York or Europe/London, and UTC. Aliases such as US/Eastern are accepted and normalized to their canonical identifier (America/New_York). Defaults to UTC when omitted, null, or blank. Reports created through the API do not inherit your organization's dashboard time zone.
25
+ attr_accessor :timezone
26
+
24
27
  attr_accessor :filters
25
28
 
26
29
  class EnumAttributeValidator
@@ -50,6 +53,7 @@ module Tremendous
50
53
  {
51
54
  :'report_type' => :'report_type',
52
55
  :'format' => :'format',
56
+ :'timezone' => :'timezone',
53
57
  :'filters' => :'filters'
54
58
  }
55
59
  end
@@ -69,6 +73,7 @@ module Tremendous
69
73
  {
70
74
  :'report_type' => :'String',
71
75
  :'format' => :'String',
76
+ :'timezone' => :'String',
72
77
  :'filters' => :'CreateReportRequestFilters'
73
78
  }
74
79
  end
@@ -76,6 +81,7 @@ module Tremendous
76
81
  # List of attributes with nullable: true
77
82
  def self.openapi_nullable
78
83
  Set.new([
84
+ :'timezone',
79
85
  :'filters'
80
86
  ])
81
87
  end
@@ -108,6 +114,10 @@ module Tremendous
108
114
  self.format = nil
109
115
  end
110
116
 
117
+ if attributes.key?(:'timezone')
118
+ self.timezone = attributes[:'timezone']
119
+ end
120
+
111
121
  if attributes.key?(:'filters')
112
122
  self.filters = attributes[:'filters']
113
123
  end
@@ -173,6 +183,7 @@ module Tremendous
173
183
  self.class == o.class &&
174
184
  report_type == o.report_type &&
175
185
  format == o.format &&
186
+ timezone == o.timezone &&
176
187
  filters == o.filters
177
188
  end
178
189
 
@@ -185,7 +196,7 @@ module Tremendous
185
196
  # Calculates hash code according to all attributes.
186
197
  # @return [Integer] Hash code
187
198
  def hash
188
- [report_type, format, filters].hash
199
+ [report_type, format, timezone, filters].hash
189
200
  end
190
201
 
191
202
  # Builds the object from hash
@@ -27,6 +27,9 @@ module Tremendous
27
27
  # Currency used for this organization's balances, orders, and transactions.
28
28
  attr_accessor :currency_code
29
29
 
30
+ # The organization's time zone as a canonical IANA identifier. Returns `null` if not configured.
31
+ attr_accessor :timezone
32
+
30
33
  # Status of the organization. Organizations need to be approved to be able to use them to send out rewards.
31
34
  attr_accessor :status
32
35
 
@@ -62,6 +65,7 @@ module Tremendous
62
65
  :'name' => :'name',
63
66
  :'website' => :'website',
64
67
  :'currency_code' => :'currency_code',
68
+ :'timezone' => :'timezone',
65
69
  :'status' => :'status',
66
70
  :'created_at' => :'created_at'
67
71
  }
@@ -84,6 +88,7 @@ module Tremendous
84
88
  :'name' => :'String',
85
89
  :'website' => :'String',
86
90
  :'currency_code' => :'String',
91
+ :'timezone' => :'String',
87
92
  :'status' => :'String',
88
93
  :'created_at' => :'Date'
89
94
  }
@@ -92,6 +97,7 @@ module Tremendous
92
97
  # List of attributes with nullable: true
93
98
  def self.openapi_nullable
94
99
  Set.new([
100
+ :'timezone',
95
101
  ])
96
102
  end
97
103
 
@@ -131,6 +137,10 @@ module Tremendous
131
137
  self.currency_code = attributes[:'currency_code']
132
138
  end
133
139
 
140
+ if attributes.key?(:'timezone')
141
+ self.timezone = attributes[:'timezone']
142
+ end
143
+
134
144
  if attributes.key?(:'status')
135
145
  self.status = attributes[:'status']
136
146
  end
@@ -225,6 +235,7 @@ module Tremendous
225
235
  name == o.name &&
226
236
  website == o.website &&
227
237
  currency_code == o.currency_code &&
238
+ timezone == o.timezone &&
228
239
  status == o.status &&
229
240
  created_at == o.created_at
230
241
  end
@@ -238,7 +249,7 @@ module Tremendous
238
249
  # Calculates hash code according to all attributes.
239
250
  # @return [Integer] Hash code
240
251
  def hash
241
- [id, name, website, currency_code, status, created_at].hash
252
+ [id, name, website, currency_code, timezone, status, created_at].hash
242
253
  end
243
254
 
244
255
  # Builds the object from hash
@@ -27,6 +27,9 @@ module Tremendous
27
27
  # Currency used for this organization's balances, orders, and transactions.
28
28
  attr_accessor :currency_code
29
29
 
30
+ # The organization's time zone as a canonical IANA identifier. Returns `null` if not configured.
31
+ attr_accessor :timezone
32
+
30
33
  # Status of the organization. Organizations need to be approved to be able to use them to send out rewards.
31
34
  attr_accessor :status
32
35
 
@@ -62,6 +65,7 @@ module Tremendous
62
65
  :'name' => :'name',
63
66
  :'website' => :'website',
64
67
  :'currency_code' => :'currency_code',
68
+ :'timezone' => :'timezone',
65
69
  :'status' => :'status',
66
70
  :'created_at' => :'created_at'
67
71
  }
@@ -84,6 +88,7 @@ module Tremendous
84
88
  :'name' => :'String',
85
89
  :'website' => :'String',
86
90
  :'currency_code' => :'String',
91
+ :'timezone' => :'String',
87
92
  :'status' => :'String',
88
93
  :'created_at' => :'Date'
89
94
  }
@@ -92,6 +97,7 @@ module Tremendous
92
97
  # List of attributes with nullable: true
93
98
  def self.openapi_nullable
94
99
  Set.new([
100
+ :'timezone',
95
101
  ])
96
102
  end
97
103
 
@@ -131,6 +137,10 @@ module Tremendous
131
137
  self.currency_code = attributes[:'currency_code']
132
138
  end
133
139
 
140
+ if attributes.key?(:'timezone')
141
+ self.timezone = attributes[:'timezone']
142
+ end
143
+
134
144
  if attributes.key?(:'status')
135
145
  self.status = attributes[:'status']
136
146
  end
@@ -225,6 +235,7 @@ module Tremendous
225
235
  name == o.name &&
226
236
  website == o.website &&
227
237
  currency_code == o.currency_code &&
238
+ timezone == o.timezone &&
228
239
  status == o.status &&
229
240
  created_at == o.created_at
230
241
  end
@@ -238,7 +249,7 @@ module Tremendous
238
249
  # Calculates hash code according to all attributes.
239
250
  # @return [Integer] Hash code
240
251
  def hash
241
- [id, name, website, currency_code, status, created_at].hash
252
+ [id, name, website, currency_code, timezone, status, created_at].hash
242
253
  end
243
254
 
244
255
  # Builds the object from hash
@@ -24,7 +24,7 @@ module Tremendous
24
24
  # Detailed description of the product.
25
25
  attr_accessor :description
26
26
 
27
- # The category of the product <table> <thead> <tr> <th>Category</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>ach</code></td> <td>Bank transfer to the recipient</td> </tr> <tr> <td><code>charity</code></td> <td>Donations to a charity</td> </tr> <tr> <td><code>instant_debit_transfer</code></td> <td>Instant debit transfer to the recipient</td> </tr> <tr> <td><code>merchant_card</code></td> <td>A gift card for a certain merchant (e.g. Amazon)</td> </tr> <tr> <td><code>paypal</code></td> <td>Payout via PayPal</td> </tr> <tr> <td><code>venmo</code></td> <td>Payout via Venmo</td> </tr> <tr> <td><code>visa_card</code></td> <td>Payout in form of a Visa debit card</td> </tr> <tr> <td><code>cash_app</code></td> <td>Payout via Cash App</td> </tr> <tr> <td><code>international_bank</code></td> <td>Bank transfer to recipients outside of the US</td> </tr> <tr> <td><code>wallet</code></td> <td>Payout to a digital wallet (e.g. GCash, MoMo)</td> </tr> </tbody> </table>
27
+ # The category of the product <table> <thead> <tr> <th>Category</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>ach</code></td> <td>Bank transfer to the recipient</td> </tr> <tr> <td><code>charity</code></td> <td>Donations to a charity</td> </tr> <tr> <td><code>instant_debit_transfer</code></td> <td>Instant debit transfer to the recipient</td> </tr> <tr> <td><code>merchant_card</code></td> <td>A gift card for a certain merchant (e.g. Amazon)</td> </tr> <tr> <td><code>paypal</code></td> <td>Payout via PayPal</td> </tr> <tr> <td><code>venmo</code></td> <td>Payout via Venmo</td> </tr> <tr> <td><code>visa_card</code></td> <td>Payout in form of a Visa debit card</td> </tr> <tr> <td><code>cash_app</code></td> <td>Payout via Cash App</td> </tr> <tr> <td><code>international_bank</code></td> <td>Bank transfer to recipients outside of the US</td> </tr> <tr> <td><code>wallet</code></td> <td>Payout to a digital wallet (e.g. GCash, MoMo)</td> </tr> <tr> <td><code>crypto_currency</code></td> <td>Payout in cryptocurrency</td> </tr> </tbody> </table>
28
28
  attr_accessor :category
29
29
 
30
30
  # Additional classification for the product. Only applicable to products with a `category` of `merchant_card`. Possible subcategories: * `beauty_and_health` * `digital_financial_services` * `electronics` * `entertainment` * `fashion` * `food_and_drink` * `general_merchandise` * `grocery_and_supermarkets` * `home_and_living` * `mobility_and_fuel` * `sports_and_outdoor_gear` * `travel_and_hospitality`
@@ -280,7 +280,7 @@ module Tremendous
280
280
  return false if @name.nil?
281
281
  return false if @description.nil?
282
282
  return false if @category.nil?
283
- category_validator = EnumAttributeValidator.new('String', ["ach", "charity", "instant_debit_transfer", "merchant_card", "paypal", "venmo", "visa_card", "cash_app", "international_bank", "wallet"])
283
+ category_validator = EnumAttributeValidator.new('String', ["ach", "charity", "instant_debit_transfer", "merchant_card", "paypal", "venmo", "visa_card", "cash_app", "international_bank", "wallet", "crypto_currency"])
284
284
  return false unless category_validator.valid?(@category)
285
285
  subcategory_validator = EnumAttributeValidator.new('String', ["beauty_and_health", "digital_financial_services", "electronics", "entertainment", "fashion", "food_and_drink", "general_merchandise", "grocery_and_supermarkets", "home_and_living", "mobility_and_fuel", "sports_and_outdoor_gear", "travel_and_hospitality"])
286
286
  return false unless subcategory_validator.valid?(@subcategory)
@@ -27,6 +27,9 @@ module Tremendous
27
27
  # Currency used for this organization's balances, orders, and transactions.
28
28
  attr_accessor :currency_code
29
29
 
30
+ # The organization's time zone as a canonical IANA identifier. Returns `null` if not configured.
31
+ attr_accessor :timezone
32
+
30
33
  # Status of the organization. Organizations need to be approved to be able to use them to send out rewards.
31
34
  attr_accessor :status
32
35
 
@@ -62,6 +65,7 @@ module Tremendous
62
65
  :'name' => :'name',
63
66
  :'website' => :'website',
64
67
  :'currency_code' => :'currency_code',
68
+ :'timezone' => :'timezone',
65
69
  :'status' => :'status',
66
70
  :'created_at' => :'created_at'
67
71
  }
@@ -84,6 +88,7 @@ module Tremendous
84
88
  :'name' => :'String',
85
89
  :'website' => :'String',
86
90
  :'currency_code' => :'String',
91
+ :'timezone' => :'String',
87
92
  :'status' => :'String',
88
93
  :'created_at' => :'Date'
89
94
  }
@@ -92,6 +97,7 @@ module Tremendous
92
97
  # List of attributes with nullable: true
93
98
  def self.openapi_nullable
94
99
  Set.new([
100
+ :'timezone',
95
101
  ])
96
102
  end
97
103
 
@@ -131,6 +137,10 @@ module Tremendous
131
137
  self.currency_code = attributes[:'currency_code']
132
138
  end
133
139
 
140
+ if attributes.key?(:'timezone')
141
+ self.timezone = attributes[:'timezone']
142
+ end
143
+
134
144
  if attributes.key?(:'status')
135
145
  self.status = attributes[:'status']
136
146
  end
@@ -225,6 +235,7 @@ module Tremendous
225
235
  name == o.name &&
226
236
  website == o.website &&
227
237
  currency_code == o.currency_code &&
238
+ timezone == o.timezone &&
228
239
  status == o.status &&
229
240
  created_at == o.created_at
230
241
  end
@@ -238,7 +249,7 @@ module Tremendous
238
249
  # Calculates hash code according to all attributes.
239
250
  # @return [Integer] Hash code
240
251
  def hash
241
- [id, name, website, currency_code, status, created_at].hash
252
+ [id, name, website, currency_code, timezone, status, created_at].hash
242
253
  end
243
254
 
244
255
  # Builds the object from hash
@@ -27,6 +27,9 @@ module Tremendous
27
27
  # Currency used for this organization's balances, orders, and transactions.
28
28
  attr_accessor :currency_code
29
29
 
30
+ # The organization's time zone as a canonical IANA identifier. Returns `null` if not configured.
31
+ attr_accessor :timezone
32
+
30
33
  # Status of the organization. Organizations need to be approved to be able to use them to send out rewards.
31
34
  attr_accessor :status
32
35
 
@@ -62,6 +65,7 @@ module Tremendous
62
65
  :'name' => :'name',
63
66
  :'website' => :'website',
64
67
  :'currency_code' => :'currency_code',
68
+ :'timezone' => :'timezone',
65
69
  :'status' => :'status',
66
70
  :'created_at' => :'created_at'
67
71
  }
@@ -84,6 +88,7 @@ module Tremendous
84
88
  :'name' => :'String',
85
89
  :'website' => :'String',
86
90
  :'currency_code' => :'String',
91
+ :'timezone' => :'String',
87
92
  :'status' => :'String',
88
93
  :'created_at' => :'Date'
89
94
  }
@@ -92,6 +97,7 @@ module Tremendous
92
97
  # List of attributes with nullable: true
93
98
  def self.openapi_nullable
94
99
  Set.new([
100
+ :'timezone',
95
101
  ])
96
102
  end
97
103
 
@@ -131,6 +137,10 @@ module Tremendous
131
137
  self.currency_code = attributes[:'currency_code']
132
138
  end
133
139
 
140
+ if attributes.key?(:'timezone')
141
+ self.timezone = attributes[:'timezone']
142
+ end
143
+
134
144
  if attributes.key?(:'status')
135
145
  self.status = attributes[:'status']
136
146
  end
@@ -225,6 +235,7 @@ module Tremendous
225
235
  name == o.name &&
226
236
  website == o.website &&
227
237
  currency_code == o.currency_code &&
238
+ timezone == o.timezone &&
228
239
  status == o.status &&
229
240
  created_at == o.created_at
230
241
  end
@@ -238,7 +249,7 @@ module Tremendous
238
249
  # Calculates hash code according to all attributes.
239
250
  # @return [Integer] Hash code
240
251
  def hash
241
- [id, name, website, currency_code, status, created_at].hash
252
+ [id, name, website, currency_code, timezone, status, created_at].hash
242
253
  end
243
254
 
244
255
  # Builds the object from hash
@@ -24,7 +24,7 @@ module Tremendous
24
24
  # Detailed description of the product.
25
25
  attr_accessor :description
26
26
 
27
- # The category of the product <table> <thead> <tr> <th>Category</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>ach</code></td> <td>Bank transfer to the recipient</td> </tr> <tr> <td><code>charity</code></td> <td>Donations to a charity</td> </tr> <tr> <td><code>instant_debit_transfer</code></td> <td>Instant debit transfer to the recipient</td> </tr> <tr> <td><code>merchant_card</code></td> <td>A gift card for a certain merchant (e.g. Amazon)</td> </tr> <tr> <td><code>paypal</code></td> <td>Payout via PayPal</td> </tr> <tr> <td><code>venmo</code></td> <td>Payout via Venmo</td> </tr> <tr> <td><code>visa_card</code></td> <td>Payout in form of a Visa debit card</td> </tr> <tr> <td><code>cash_app</code></td> <td>Payout via Cash App</td> </tr> <tr> <td><code>international_bank</code></td> <td>Bank transfer to recipients outside of the US</td> </tr> <tr> <td><code>wallet</code></td> <td>Payout to a digital wallet (e.g. GCash, MoMo)</td> </tr> </tbody> </table>
27
+ # The category of the product <table> <thead> <tr> <th>Category</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>ach</code></td> <td>Bank transfer to the recipient</td> </tr> <tr> <td><code>charity</code></td> <td>Donations to a charity</td> </tr> <tr> <td><code>instant_debit_transfer</code></td> <td>Instant debit transfer to the recipient</td> </tr> <tr> <td><code>merchant_card</code></td> <td>A gift card for a certain merchant (e.g. Amazon)</td> </tr> <tr> <td><code>paypal</code></td> <td>Payout via PayPal</td> </tr> <tr> <td><code>venmo</code></td> <td>Payout via Venmo</td> </tr> <tr> <td><code>visa_card</code></td> <td>Payout in form of a Visa debit card</td> </tr> <tr> <td><code>cash_app</code></td> <td>Payout via Cash App</td> </tr> <tr> <td><code>international_bank</code></td> <td>Bank transfer to recipients outside of the US</td> </tr> <tr> <td><code>wallet</code></td> <td>Payout to a digital wallet (e.g. GCash, MoMo)</td> </tr> <tr> <td><code>crypto_currency</code></td> <td>Payout in cryptocurrency</td> </tr> </tbody> </table>
28
28
  attr_accessor :category
29
29
 
30
30
  # Additional classification for the product. Only applicable to products with a `category` of `merchant_card`. Possible subcategories: * `beauty_and_health` * `digital_financial_services` * `electronics` * `entertainment` * `fashion` * `food_and_drink` * `general_merchandise` * `grocery_and_supermarkets` * `home_and_living` * `mobility_and_fuel` * `sports_and_outdoor_gear` * `travel_and_hospitality`
@@ -280,7 +280,7 @@ module Tremendous
280
280
  return false if @name.nil?
281
281
  return false if @description.nil?
282
282
  return false if @category.nil?
283
- category_validator = EnumAttributeValidator.new('String', ["ach", "charity", "instant_debit_transfer", "merchant_card", "paypal", "venmo", "visa_card", "cash_app", "international_bank", "wallet"])
283
+ category_validator = EnumAttributeValidator.new('String', ["ach", "charity", "instant_debit_transfer", "merchant_card", "paypal", "venmo", "visa_card", "cash_app", "international_bank", "wallet", "crypto_currency"])
284
284
  return false unless category_validator.valid?(@category)
285
285
  subcategory_validator = EnumAttributeValidator.new('String', ["beauty_and_health", "digital_financial_services", "electronics", "entertainment", "fashion", "food_and_drink", "general_merchandise", "grocery_and_supermarkets", "home_and_living", "mobility_and_fuel", "sports_and_outdoor_gear", "travel_and_hospitality"])
286
286
  return false unless subcategory_validator.valid?(@subcategory)
@@ -1,3 +1,3 @@
1
1
  module Tremendous
2
- VERSION = "6.0.0"
2
+ VERSION = "7.0.0"
3
3
  end
data/lib/tremendous.rb CHANGED
@@ -39,8 +39,6 @@ require 'tremendous/models/connected_organization_member_session_response_connec
39
39
  require 'tremendous/models/connected_organization_organization'
40
40
  require 'tremendous/models/connected_organization_response'
41
41
  require 'tremendous/models/connected_organization_response_connected_organization'
42
- require 'tremendous/models/create_api_key200_response'
43
- require 'tremendous/models/create_api_key_request'
44
42
  require 'tremendous/models/create_campaign200_response'
45
43
  require 'tremendous/models/create_campaign_request'
46
44
  require 'tremendous/models/create_connected_organization200_response'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tremendous_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tremendous Developers
@@ -90,8 +90,6 @@ files:
90
90
  - lib/tremendous/models/connected_organization_organization.rb
91
91
  - lib/tremendous/models/connected_organization_response.rb
92
92
  - lib/tremendous/models/connected_organization_response_connected_organization.rb
93
- - lib/tremendous/models/create_api_key200_response.rb
94
- - lib/tremendous/models/create_api_key_request.rb
95
93
  - lib/tremendous/models/create_campaign200_response.rb
96
94
  - lib/tremendous/models/create_campaign_request.rb
97
95
  - lib/tremendous/models/create_connected_organization200_response.rb
@@ -1,148 +0,0 @@
1
- =begin
2
- #API Endpoints
3
-
4
- #Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and its members within Tremendous, please see the Tremendous Organizational API.
5
-
6
- The version of the OpenAPI document: 2
7
- Contact: developers@tremendous.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.25.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Tremendous
17
- class CreateApiKey200Response < ApiModelBase
18
- # The new API key
19
- attr_accessor :api_key
20
-
21
- # Attribute mapping from ruby-style variable name to JSON key.
22
- def self.attribute_map
23
- {
24
- :'api_key' => :'api_key'
25
- }
26
- end
27
-
28
- # Returns attribute mapping this model knows about
29
- def self.acceptable_attribute_map
30
- attribute_map
31
- end
32
-
33
- # Returns all the JSON keys this model knows about
34
- def self.acceptable_attributes
35
- acceptable_attribute_map.values
36
- end
37
-
38
- # Attribute type mapping.
39
- def self.openapi_types
40
- {
41
- :'api_key' => :'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 `Tremendous::CreateApiKey200Response` initialize method"
56
- end
57
-
58
- # check to see if the attribute exists and convert string to symbol for hash key
59
- acceptable_attribute_map = self.class.acceptable_attribute_map
60
- attributes = attributes.each_with_object({}) { |(k, v), h|
61
- if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::CreateApiKey200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
- end
64
- h[k.to_sym] = v
65
- }
66
-
67
- if attributes.key?(:'api_key')
68
- self.api_key = attributes[:'api_key']
69
- end
70
- end
71
-
72
- # Show invalid properties with the reasons. Usually used together with valid?
73
- # @return Array for valid properties with the reasons
74
- def list_invalid_properties
75
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
- invalid_properties = Array.new
77
- invalid_properties
78
- end
79
-
80
- # Check to see if the all the properties in the model are valid
81
- # @return true if the model is valid
82
- def valid?
83
- warn '[DEPRECATED] the `valid?` method is obsolete'
84
- true
85
- end
86
-
87
- # Checks equality by comparing each attribute.
88
- # @param [Object] Object to be compared
89
- def ==(o)
90
- return true if self.equal?(o)
91
- self.class == o.class &&
92
- api_key == o.api_key
93
- end
94
-
95
- # @see the `==` method
96
- # @param [Object] Object to be compared
97
- def eql?(o)
98
- self == o
99
- end
100
-
101
- # Calculates hash code according to all attributes.
102
- # @return [Integer] Hash code
103
- def hash
104
- [api_key].hash
105
- end
106
-
107
- # Builds the object from hash
108
- # @param [Hash] attributes Model attributes in the form of hash
109
- # @return [Object] Returns the model itself
110
- def self.build_from_hash(attributes)
111
- return nil unless attributes.is_a?(Hash)
112
- attributes = attributes.transform_keys(&:to_sym)
113
- transformed_hash = {}
114
- openapi_types.each_pair do |key, type|
115
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
- transformed_hash["#{key}"] = nil
117
- elsif type =~ /\AArray<(.*)>/i
118
- # check to ensure the input is an array given that the attribute
119
- # is documented as an array but the input is not
120
- if attributes[attribute_map[key]].is_a?(Array)
121
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
- end
123
- elsif !attributes[attribute_map[key]].nil?
124
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
- end
126
- end
127
- new(transformed_hash)
128
- end
129
-
130
- # Returns the object in the form of hash
131
- # @return [Hash] Returns the object in the form of hash
132
- def to_hash
133
- hash = {}
134
- self.class.attribute_map.each_pair do |attr, param|
135
- value = self.send(attr)
136
- if value.nil?
137
- is_nullable = self.class.openapi_nullable.include?(attr)
138
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
139
- end
140
-
141
- hash[param] = _to_hash(value)
142
- end
143
- hash
144
- end
145
-
146
- end
147
-
148
- end