tremendous_ruby 5.8.0 → 5.10.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.
Files changed (231) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +525 -56
  3. data/lib/tremendous/api_client.rb +1 -1
  4. data/lib/tremendous/api_error.rb +1 -1
  5. data/lib/tremendous/configuration.rb +1 -1
  6. data/lib/tremendous/models/allow_email.rb +1 -1
  7. data/lib/tremendous/models/allow_email1.rb +1 -1
  8. data/lib/tremendous/models/allow_ip.rb +1 -1
  9. data/lib/tremendous/models/allow_ip1.rb +1 -1
  10. data/lib/tremendous/models/balance_transaction.rb +1 -1
  11. data/lib/tremendous/models/balance_transaction_order.rb +1 -1
  12. data/lib/tremendous/models/balance_transaction_order_payment.rb +1 -1
  13. data/lib/tremendous/models/base_order_for_create.rb +1 -1
  14. data/lib/tremendous/models/campaign.rb +1 -1
  15. data/lib/tremendous/models/campaign_base.rb +1 -1
  16. data/lib/tremendous/models/channel.rb +1 -1
  17. data/lib/tremendous/models/connected_organization.rb +287 -0
  18. data/lib/tremendous/models/connected_organization_member.rb +330 -0
  19. data/lib/tremendous/models/connected_organization_member_member.rb +366 -0
  20. data/lib/tremendous/models/connected_organization_member_session.rb +311 -0
  21. data/lib/tremendous/models/connected_organization_organization.rb +324 -0
  22. data/lib/tremendous/models/create_api_key200_response.rb +1 -1
  23. data/lib/tremendous/models/create_campaign200_response.rb +221 -0
  24. data/lib/tremendous/models/create_campaign201_response.rb +1 -1
  25. data/lib/tremendous/models/create_campaign_request.rb +1 -1
  26. data/lib/tremendous/models/create_connected_organization200_response.rb +221 -0
  27. data/lib/tremendous/models/create_connected_organization_member200_response.rb +221 -0
  28. data/lib/tremendous/models/create_connected_organization_member_request.rb +222 -0
  29. data/lib/tremendous/models/create_connected_organization_member_session200_response.rb +221 -0
  30. data/lib/tremendous/models/create_connected_organization_member_session200_response_connected_organization_member_session.rb +311 -0
  31. data/lib/tremendous/models/create_connected_organization_member_session_request.rb +222 -0
  32. data/lib/tremendous/models/create_connected_organization_request.rb +222 -0
  33. data/lib/tremendous/models/create_invoice200_response.rb +1 -1
  34. data/lib/tremendous/models/create_invoice_request.rb +1 -1
  35. data/lib/tremendous/models/create_member.rb +1 -1
  36. data/lib/tremendous/models/create_member200_response.rb +1 -1
  37. data/lib/tremendous/models/create_member_request.rb +1 -1
  38. data/lib/tremendous/models/create_order200_response.rb +1 -1
  39. data/lib/tremendous/models/create_order200_response_order.rb +1 -1
  40. data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +1 -1
  41. data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +2 -2
  42. data/lib/tremendous/models/create_order_request.rb +1 -1
  43. data/lib/tremendous/models/create_organization.rb +1 -1
  44. data/lib/tremendous/models/create_organization200_response.rb +1 -1
  45. data/lib/tremendous/models/create_organization200_response_organization.rb +1 -1
  46. data/lib/tremendous/models/create_organization_for_response.rb +1 -1
  47. data/lib/tremendous/models/create_organization_properties.rb +1 -1
  48. data/lib/tremendous/models/create_organization_request.rb +1 -1
  49. data/lib/tremendous/models/create_organization_request_copy_settings.rb +17 -5
  50. data/lib/tremendous/models/create_report200_response.rb +231 -0
  51. data/lib/tremendous/models/create_report200_response_report.rb +291 -0
  52. data/lib/tremendous/models/create_report201_response.rb +1 -1
  53. data/lib/tremendous/models/create_report201_response_report.rb +2 -2
  54. data/lib/tremendous/models/create_report_request.rb +1 -1
  55. data/lib/tremendous/models/create_report_request_filters.rb +1 -1
  56. data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +1 -1
  57. data/lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb +1 -1
  58. data/lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb +1 -1
  59. data/lib/tremendous/models/create_webhook200_response.rb +1 -1
  60. data/lib/tremendous/models/create_webhook_request.rb +1 -1
  61. data/lib/tremendous/models/currency_codes.rb +1 -1
  62. data/lib/tremendous/models/custom_field.rb +1 -1
  63. data/lib/tremendous/models/delete_fraud_rule200_response.rb +1 -1
  64. data/lib/tremendous/models/delivery_details.rb +2 -2
  65. data/lib/tremendous/models/delivery_details_with_link.rb +2 -2
  66. data/lib/tremendous/models/delivery_metadata.rb +236 -0
  67. data/lib/tremendous/models/delivery_method.rb +1 -1
  68. data/lib/tremendous/models/delivery_status.rb +1 -1
  69. data/lib/tremendous/models/error_model.rb +1 -1
  70. data/lib/tremendous/models/field.rb +1 -1
  71. data/lib/tremendous/models/fraud_config_allow_email.rb +1 -1
  72. data/lib/tremendous/models/fraud_config_country.rb +1 -1
  73. data/lib/tremendous/models/fraud_config_country_update_list.rb +1 -1
  74. data/lib/tremendous/models/fraud_config_ip.rb +1 -1
  75. data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +1 -1
  76. data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +1 -1
  77. data/lib/tremendous/models/fraud_config_review_email.rb +1 -1
  78. data/lib/tremendous/models/fraud_generic_response.rb +1 -1
  79. data/lib/tremendous/models/fraud_review.rb +2 -2
  80. data/lib/tremendous/models/fraud_review_geo.rb +1 -1
  81. data/lib/tremendous/models/fraud_review_list_item.rb +2 -2
  82. data/lib/tremendous/models/fraud_review_reason.rb +3 -2
  83. data/lib/tremendous/models/fraud_review_redemption_method.rb +1 -1
  84. data/lib/tremendous/models/fraud_review_related_rewards.rb +1 -1
  85. data/lib/tremendous/models/fraud_review_risk.rb +1 -1
  86. data/lib/tremendous/models/fraud_review_status.rb +1 -1
  87. data/lib/tremendous/models/fraud_rule200_response.rb +1 -1
  88. data/lib/tremendous/models/fraud_rule400_response.rb +1 -1
  89. data/lib/tremendous/models/fraud_rule422_response.rb +1 -1
  90. data/lib/tremendous/models/fraud_rule_request.rb +1 -1
  91. data/lib/tremendous/models/fraud_rule_request_config.rb +1 -1
  92. data/lib/tremendous/models/fraud_rule_type.rb +1 -1
  93. data/lib/tremendous/models/fraud_rules_list_item.rb +1 -1
  94. data/lib/tremendous/models/funding_source.rb +36 -2
  95. data/lib/tremendous/models/generate_reward_link200_response.rb +1 -1
  96. data/lib/tremendous/models/generate_reward_link200_response_reward.rb +1 -1
  97. data/lib/tremendous/models/generate_reward_link403_response.rb +1 -1
  98. data/lib/tremendous/models/generate_reward_token200_response.rb +1 -1
  99. data/lib/tremendous/models/generate_reward_token200_response_reward.rb +1 -1
  100. data/lib/tremendous/models/get_fraud_review200_response.rb +1 -1
  101. data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +2 -2
  102. data/lib/tremendous/models/get_fraud_review200_response_fraud_review_geo.rb +1 -1
  103. data/lib/tremendous/models/get_fraud_review200_response_fraud_review_related_rewards.rb +1 -1
  104. data/lib/tremendous/models/get_funding_source200_response.rb +1 -1
  105. data/lib/tremendous/models/get_member200_response.rb +1 -1
  106. data/lib/tremendous/models/get_member200_response_member.rb +1 -1
  107. data/lib/tremendous/models/get_member200_response_member_events_inner.rb +1 -1
  108. data/lib/tremendous/models/get_order200_response.rb +1 -1
  109. data/lib/tremendous/models/get_organization200_response.rb +1 -1
  110. data/lib/tremendous/models/get_product_response.rb +1 -1
  111. data/lib/tremendous/models/get_reward200_response.rb +1 -1
  112. data/lib/tremendous/models/invoice.rb +1 -1
  113. data/lib/tremendous/models/list_balance_transactions200_response.rb +1 -1
  114. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +1 -1
  115. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb +1 -1
  116. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb +1 -1
  117. data/lib/tremendous/models/list_campaigns200_response.rb +1 -1
  118. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +1 -1
  119. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb +2 -2
  120. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +3 -3
  121. data/lib/tremendous/models/list_connected_organization_members200_response.rb +240 -0
  122. data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner.rb +330 -0
  123. data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner_member.rb +366 -0
  124. data/lib/tremendous/models/list_connected_organizations200_response.rb +240 -0
  125. data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner.rb +287 -0
  126. data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner_organization.rb +324 -0
  127. data/lib/tremendous/models/list_fields200_response.rb +1 -1
  128. data/lib/tremendous/models/list_fields200_response_fields_inner.rb +1 -1
  129. data/lib/tremendous/models/list_forex_response.rb +1 -1
  130. data/lib/tremendous/models/list_fraud_reviews200_response.rb +1 -1
  131. data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +2 -2
  132. data/lib/tremendous/models/list_fraud_rules200_response.rb +1 -1
  133. data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +1 -1
  134. data/lib/tremendous/models/list_funding_sources200_response.rb +1 -1
  135. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +36 -2
  136. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +1 -1
  137. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +1 -1
  138. data/lib/tremendous/models/list_invoices200_response.rb +1 -1
  139. data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +1 -1
  140. data/lib/tremendous/models/list_members200_response.rb +1 -1
  141. data/lib/tremendous/models/list_members200_response_members_inner.rb +1 -1
  142. data/lib/tremendous/models/list_orders200_response.rb +1 -1
  143. data/lib/tremendous/models/list_orders200_response_orders_inner.rb +1 -1
  144. data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +1 -1
  145. data/lib/tremendous/models/list_orders200_response_orders_inner_payment_refund.rb +1 -1
  146. data/lib/tremendous/models/list_organizations200_response.rb +1 -1
  147. data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +1 -1
  148. data/lib/tremendous/models/list_products_response.rb +1 -1
  149. data/lib/tremendous/models/list_products_response_products_inner.rb +30 -10
  150. data/lib/tremendous/models/list_products_response_products_inner_countries_inner.rb +1 -1
  151. data/lib/tremendous/models/list_products_response_products_inner_documents.rb +236 -0
  152. data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +16 -5
  153. data/lib/tremendous/models/list_products_response_products_inner_skus_inner.rb +1 -1
  154. data/lib/tremendous/models/list_rewards200_response.rb +1 -1
  155. data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +1 -1
  156. data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +1 -1
  157. data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +2 -2
  158. data/lib/tremendous/models/list_rewards200_response_rewards_inner_recipient.rb +1 -1
  159. data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +1 -1
  160. data/lib/tremendous/models/list_rewards401_response.rb +1 -1
  161. data/lib/tremendous/models/list_rewards401_response_errors.rb +1 -1
  162. data/lib/tremendous/models/list_rewards429_response.rb +1 -1
  163. data/lib/tremendous/models/list_roles200_response.rb +1 -1
  164. data/lib/tremendous/models/list_roles200_response_roles_inner.rb +1 -1
  165. data/lib/tremendous/models/list_webhook_events200_response.rb +1 -1
  166. data/lib/tremendous/models/list_webhooks200_response.rb +1 -1
  167. data/lib/tremendous/models/list_webhooks200_response_webhooks_inner.rb +1 -1
  168. data/lib/tremendous/models/member.rb +1 -1
  169. data/lib/tremendous/models/member_base.rb +1 -1
  170. data/lib/tremendous/models/member_with_events.rb +1 -1
  171. data/lib/tremendous/models/member_without_events.rb +1 -1
  172. data/lib/tremendous/models/order.rb +1 -1
  173. data/lib/tremendous/models/order_base.rb +1 -1
  174. data/lib/tremendous/models/order_base_payment.rb +1 -1
  175. data/lib/tremendous/models/order_status.rb +1 -1
  176. data/lib/tremendous/models/order_with_link.rb +1 -1
  177. data/lib/tremendous/models/order_with_link_rewards_inner.rb +1 -1
  178. data/lib/tremendous/models/order_without_link.rb +1 -1
  179. data/lib/tremendous/models/order_without_link_rewards_inner.rb +1 -1
  180. data/lib/tremendous/models/organization.rb +1 -1
  181. data/lib/tremendous/models/payment_details.rb +1 -1
  182. data/lib/tremendous/models/payment_details_refund.rb +1 -1
  183. data/lib/tremendous/models/payout.rb +1 -1
  184. data/lib/tremendous/models/product.rb +30 -10
  185. data/lib/tremendous/models/product_documents.rb +236 -0
  186. data/lib/tremendous/models/recipient.rb +1 -1
  187. data/lib/tremendous/models/refund_details.rb +1 -1
  188. data/lib/tremendous/models/report.rb +2 -2
  189. data/lib/tremendous/models/resend_reward422_response.rb +1 -1
  190. data/lib/tremendous/models/resend_reward_request.rb +1 -1
  191. data/lib/tremendous/models/review_country.rb +1 -1
  192. data/lib/tremendous/models/review_country1.rb +1 -1
  193. data/lib/tremendous/models/review_email.rb +1 -1
  194. data/lib/tremendous/models/review_email1.rb +1 -1
  195. data/lib/tremendous/models/review_ip.rb +1 -1
  196. data/lib/tremendous/models/review_ip1.rb +1 -1
  197. data/lib/tremendous/models/review_redeemed_rewards_amount.rb +1 -1
  198. data/lib/tremendous/models/review_redeemed_rewards_count.rb +1 -1
  199. data/lib/tremendous/models/reward.rb +1 -1
  200. data/lib/tremendous/models/reward_base.rb +1 -1
  201. data/lib/tremendous/models/reward_base_custom_fields_inner.rb +1 -1
  202. data/lib/tremendous/models/reward_for_order_create.rb +1 -1
  203. data/lib/tremendous/models/reward_link.rb +1 -1
  204. data/lib/tremendous/models/reward_token.rb +1 -1
  205. data/lib/tremendous/models/reward_value.rb +1 -1
  206. data/lib/tremendous/models/reward_with_link.rb +1 -1
  207. data/lib/tremendous/models/reward_with_link_delivery.rb +2 -2
  208. data/lib/tremendous/models/reward_without_link.rb +1 -1
  209. data/lib/tremendous/models/reward_without_link_delivery.rb +2 -2
  210. data/lib/tremendous/models/role.rb +1 -1
  211. data/lib/tremendous/models/simulate_webhook_request.rb +1 -1
  212. data/lib/tremendous/models/single_reward_order.rb +1 -1
  213. data/lib/tremendous/models/single_reward_order_payment.rb +1 -1
  214. data/lib/tremendous/models/single_reward_order_reward.rb +1 -1
  215. data/lib/tremendous/models/single_reward_order_reward_custom_fields_inner.rb +1 -1
  216. data/lib/tremendous/models/single_reward_order_reward_delivery.rb +14 -5
  217. data/lib/tremendous/models/single_reward_order_reward_delivery_meta.rb +236 -0
  218. data/lib/tremendous/models/single_reward_order_with_link.rb +1 -1
  219. data/lib/tremendous/models/single_reward_order_with_link_order.rb +1 -1
  220. data/lib/tremendous/models/single_reward_order_without_link.rb +1 -1
  221. data/lib/tremendous/models/single_reward_order_without_link_order.rb +1 -1
  222. data/lib/tremendous/models/update_campaign.rb +1 -1
  223. data/lib/tremendous/models/update_campaign_request.rb +1 -1
  224. data/lib/tremendous/models/update_fraud_rule_list200_response.rb +1 -1
  225. data/lib/tremendous/models/update_fraud_rule_list_request.rb +1 -1
  226. data/lib/tremendous/models/update_fraud_rule_list_request_config.rb +1 -1
  227. data/lib/tremendous/models/webhook.rb +1 -1
  228. data/lib/tremendous/models/webhook_post.rb +1 -1
  229. data/lib/tremendous/version.rb +1 -1
  230. data/lib/tremendous.rb +26 -6
  231. metadata +28 -7
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -21,6 +21,12 @@ module Tremendous
21
21
  # You can pay for rewards using different payment methods on Tremendous: <table> <thead> <tr> <th>Payment Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>balance</code></td> <td>Pre-funded balance in your Tremendous account to draw funds from to send rewards to recipients.</td> </tr> <tr> <td><code>bank_account</code></td> <td>Bank account to draw funds from to send rewards to recipients.</td> </tr> <tr> <td><code>credit_card</code></td> <td>Credit card to draw funds from to send rewards to recipients.</td> </tr> <tr> <td><code>invoice</code></td> <td>Send rewards to recipients and pay by invoice.</td> </tr> </tbody> </table>
22
22
  attr_accessor :method
23
23
 
24
+ # Indicates the level of access granted for using this funding source. Permissions is an array containing the following: * `api_orders` * `dashboard_orders` * `balance_funding`
25
+ attr_accessor :usage_permissions
26
+
27
+ # Status of the funding_source
28
+ attr_accessor :status
29
+
24
30
  # **Only available when `method` is set to `invoice`.**
25
31
  attr_accessor :type
26
32
 
@@ -53,6 +59,8 @@ module Tremendous
53
59
  {
54
60
  :'id' => :'id',
55
61
  :'method' => :'method',
62
+ :'usage_permissions' => :'usage_permissions',
63
+ :'status' => :'status',
56
64
  :'type' => :'type',
57
65
  :'meta' => :'meta'
58
66
  }
@@ -68,6 +76,8 @@ module Tremendous
68
76
  {
69
77
  :'id' => :'String',
70
78
  :'method' => :'String',
79
+ :'usage_permissions' => :'Array<String>',
80
+ :'status' => :'String',
71
81
  :'type' => :'String',
72
82
  :'meta' => :'ListFundingSources200ResponseFundingSourcesInnerMeta'
73
83
  }
@@ -106,6 +116,16 @@ module Tremendous
106
116
  self.method = nil
107
117
  end
108
118
 
119
+ if attributes.key?(:'usage_permissions')
120
+ if (value = attributes[:'usage_permissions']).is_a?(Array)
121
+ self.usage_permissions = value
122
+ end
123
+ end
124
+
125
+ if attributes.key?(:'status')
126
+ self.status = attributes[:'status']
127
+ end
128
+
109
129
  if attributes.key?(:'type')
110
130
  self.type = attributes[:'type']
111
131
  end
@@ -151,6 +171,8 @@ module Tremendous
151
171
  return false if @method.nil?
152
172
  method_validator = EnumAttributeValidator.new('String', ["balance", "bank_account", "credit_card", "invoice"])
153
173
  return false unless method_validator.valid?(@method)
174
+ status_validator = EnumAttributeValidator.new('String', ["active", "deleted", "pending_confirmation", "failed"])
175
+ return false unless status_validator.valid?(@status)
154
176
  type_validator = EnumAttributeValidator.new('String', ["COMMERCIAL", "PRO_FORMA", "PREFUNDING_ONLY"])
155
177
  return false unless type_validator.valid?(@type)
156
178
  return false if @meta.nil?
@@ -182,6 +204,16 @@ module Tremendous
182
204
  @method = method
183
205
  end
184
206
 
207
+ # Custom attribute writer method checking allowed values (enum).
208
+ # @param [Object] status Object to be assigned
209
+ def status=(status)
210
+ validator = EnumAttributeValidator.new('String', ["active", "deleted", "pending_confirmation", "failed"])
211
+ unless validator.valid?(status)
212
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
213
+ end
214
+ @status = status
215
+ end
216
+
185
217
  # Custom attribute writer method checking allowed values (enum).
186
218
  # @param [Object] type Object to be assigned
187
219
  def type=(type)
@@ -199,6 +231,8 @@ module Tremendous
199
231
  self.class == o.class &&
200
232
  id == o.id &&
201
233
  method == o.method &&
234
+ usage_permissions == o.usage_permissions &&
235
+ status == o.status &&
202
236
  type == o.type &&
203
237
  meta == o.meta
204
238
  end
@@ -212,7 +246,7 @@ module Tremendous
212
246
  # Calculates hash code according to all attributes.
213
247
  # @return [Integer] Hash code
214
248
  def hash
215
- [id, method, type, meta].hash
249
+ [id, method, usage_permissions, status, type, meta].hash
216
250
  end
217
251
 
218
252
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -22,7 +22,7 @@ module Tremendous
22
22
  # The fraud risk associated with the reward.
23
23
  attr_accessor :risk
24
24
 
25
- # The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward dollar limit` * `Over reward count limit` * `VPN detected` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `IP related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email`
25
+ # The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward dollar limit` * `Over reward count limit` * `VPN detected` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email`
26
26
  attr_accessor :reasons
27
27
 
28
28
  # The name of the person who reviewed the reward, or `Automatic Review` if the reward was blocked automatically. Rewards can be automatically blocked if they remain in the flagged fraud queue for more than 30 days. This field is only present if the status is not `flagged`.
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -28,7 +28,7 @@ module Tremendous
28
28
  # Image height in pixels
29
29
  attr_accessor :logo_image_height_px
30
30
 
31
- # Logo backgrond color code (hex, rgb, or rgba)
31
+ # Logo background color code (hex, rgb, or rgba)
32
32
  attr_accessor :logo_background_color
33
33
 
34
34
  # Button color code (hex, rgb, or rgba)
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #API Endpoints
3
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 it's members within Tremendous, please see the Tremendous Organizational API.
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
5
 
6
6
  The version of the OpenAPI document: 2
7
7
  Contact: developers@tremendous.com
@@ -28,10 +28,10 @@ module Tremendous
28
28
  # Image height in pixels
29
29
  attr_accessor :logo_image_height_px
30
30
 
31
- # Logo backgrond color code (hex, rgb, or rgba)
31
+ # Logo background color code (hex, rgb, or rgba)
32
32
  attr_accessor :logo_background_color
33
33
 
34
- # Backgrond color code (hex, rgb, or rgba)
34
+ # Background color code (hex, rgb, or rgba)
35
35
  attr_accessor :background_color
36
36
 
37
37
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -0,0 +1,240 @@
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.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Tremendous
17
+ class ListConnectedOrganizationMembers200Response
18
+ attr_accessor :connected_organization_members
19
+
20
+ # The total number of connected organizations across all pages
21
+ attr_accessor :total_count
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'connected_organization_members' => :'connected_organization_members',
27
+ :'total_count' => :'total_count'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'connected_organization_members' => :'Array<ListConnectedOrganizationMembers200ResponseConnectedOrganizationMembersInner>',
40
+ :'total_count' => :'Integer'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::ListConnectedOrganizationMembers200Response` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::ListConnectedOrganizationMembers200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'connected_organization_members')
66
+ if (value = attributes[:'connected_organization_members']).is_a?(Array)
67
+ self.connected_organization_members = value
68
+ end
69
+ else
70
+ self.connected_organization_members = nil
71
+ end
72
+
73
+ if attributes.key?(:'total_count')
74
+ self.total_count = attributes[:'total_count']
75
+ else
76
+ self.total_count = nil
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
+ invalid_properties = Array.new
85
+ if @connected_organization_members.nil?
86
+ invalid_properties.push('invalid value for "connected_organization_members", connected_organization_members cannot be nil.')
87
+ end
88
+
89
+ if @total_count.nil?
90
+ invalid_properties.push('invalid value for "total_count", total_count cannot be nil.')
91
+ end
92
+
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
+ return false if @connected_organization_members.nil?
101
+ return false if @total_count.nil?
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ connected_organization_members == o.connected_organization_members &&
111
+ total_count == o.total_count
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [connected_organization_members, total_count].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def self._deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = Tremendous.const_get(type)
188
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end