tremendous_ruby 5.29.0 → 5.30.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 (268) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +48 -45
  3. data/lib/tremendous/api_client.rb +7 -3
  4. data/lib/tremendous/api_error.rb +1 -1
  5. data/lib/tremendous/api_model_base.rb +88 -0
  6. data/lib/tremendous/configuration.rb +1 -1
  7. data/lib/tremendous/models/allow_email.rb +2 -75
  8. data/lib/tremendous/models/allow_ip.rb +2 -75
  9. data/lib/tremendous/models/balance_transaction.rb +2 -75
  10. data/lib/tremendous/models/balance_transaction_order.rb +2 -75
  11. data/lib/tremendous/models/balance_transaction_order_payment.rb +2 -75
  12. data/lib/tremendous/models/base_order_for_create.rb +2 -75
  13. data/lib/tremendous/models/campaign.rb +4 -77
  14. data/lib/tremendous/models/campaign_base.rb +4 -77
  15. data/lib/tremendous/models/campaign_base_products_inner.rb +102 -0
  16. data/lib/tremendous/models/channel.rb +1 -1
  17. data/lib/tremendous/models/connected_organization.rb +2 -75
  18. data/lib/tremendous/models/connected_organization_member.rb +2 -75
  19. data/lib/tremendous/models/connected_organization_member_member.rb +2 -75
  20. data/lib/tremendous/models/connected_organization_member_response.rb +164 -0
  21. data/lib/tremendous/models/connected_organization_member_response_connected_organization_member.rb +273 -0
  22. data/lib/tremendous/models/connected_organization_member_session.rb +2 -75
  23. data/lib/tremendous/models/connected_organization_member_session_response.rb +164 -0
  24. data/lib/tremendous/models/connected_organization_member_session_response_connected_organization_member_session.rb +310 -0
  25. data/lib/tremendous/models/connected_organization_organization.rb +2 -75
  26. data/lib/tremendous/models/{generate_reward_link403_response.rb → connected_organization_response.rb} +20 -103
  27. data/lib/tremendous/models/connected_organization_response_connected_organization.rb +240 -0
  28. data/lib/tremendous/models/create_api_key200_response.rb +2 -75
  29. data/lib/tremendous/models/create_api_key_request.rb +2 -75
  30. data/lib/tremendous/models/create_campaign200_response.rb +2 -75
  31. data/lib/tremendous/models/create_campaign_request.rb +4 -77
  32. data/lib/tremendous/models/create_connected_organization200_response.rb +2 -75
  33. data/lib/tremendous/models/create_connected_organization_member200_response.rb +2 -75
  34. data/lib/tremendous/models/create_connected_organization_member_request.rb +2 -75
  35. data/lib/tremendous/models/create_connected_organization_member_session200_response.rb +2 -75
  36. data/lib/tremendous/models/create_connected_organization_member_session200_response_connected_organization_member_session.rb +2 -75
  37. data/lib/tremendous/models/create_connected_organization_member_session_request.rb +2 -75
  38. data/lib/tremendous/models/create_connected_organization_request.rb +3 -76
  39. data/lib/tremendous/models/create_connected_organization_request_kyb_prefill.rb +13 -76
  40. data/lib/tremendous/models/create_field.rb +2 -75
  41. data/lib/tremendous/models/create_field200_response.rb +2 -75
  42. data/lib/tremendous/models/create_field_request.rb +2 -75
  43. data/lib/tremendous/models/create_field_request_data.rb +2 -75
  44. data/lib/tremendous/models/create_invoice200_response.rb +2 -75
  45. data/lib/tremendous/models/create_invoice_request.rb +4 -77
  46. data/lib/tremendous/models/create_member.rb +2 -75
  47. data/lib/tremendous/models/create_member200_response.rb +2 -75
  48. data/lib/tremendous/models/create_member_request.rb +2 -75
  49. data/lib/tremendous/models/create_order200_response.rb +2 -75
  50. data/lib/tremendous/models/create_order200_response_order.rb +3 -76
  51. data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +2 -75
  52. data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +2 -75
  53. data/lib/tremendous/models/create_order_request.rb +3 -4
  54. data/lib/tremendous/models/create_organization.rb +2 -75
  55. data/lib/tremendous/models/create_organization200_response.rb +2 -75
  56. data/lib/tremendous/models/create_organization200_response_organization.rb +2 -75
  57. data/lib/tremendous/models/create_organization_for_response.rb +2 -75
  58. data/lib/tremendous/models/create_organization_properties.rb +2 -75
  59. data/lib/tremendous/models/create_organization_request.rb +2 -75
  60. data/lib/tremendous/models/create_organization_request_copy_settings.rb +2 -75
  61. data/lib/tremendous/models/create_organization_response.rb +147 -0
  62. data/lib/tremendous/models/create_organization_response_organization.rb +282 -0
  63. data/lib/tremendous/models/create_report200_response.rb +2 -75
  64. data/lib/tremendous/models/create_report200_response_report.rb +2 -75
  65. data/lib/tremendous/models/create_report_request.rb +2 -75
  66. data/lib/tremendous/models/create_report_request_filters.rb +2 -75
  67. data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +2 -75
  68. data/lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb +2 -75
  69. data/lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb +2 -75
  70. data/lib/tremendous/models/create_topup200_response.rb +2 -75
  71. data/lib/tremendous/models/create_topup_request.rb +2 -75
  72. data/lib/tremendous/models/create_webhook200_response.rb +2 -75
  73. data/lib/tremendous/models/create_webhook_request.rb +2 -75
  74. data/lib/tremendous/models/currency_codes.rb +1 -1
  75. data/lib/tremendous/models/custom_field.rb +2 -75
  76. data/lib/tremendous/models/delivery_details.rb +2 -75
  77. data/lib/tremendous/models/delivery_details_with_link.rb +2 -75
  78. data/lib/tremendous/models/delivery_metadata.rb +2 -75
  79. data/lib/tremendous/models/delivery_method.rb +1 -1
  80. data/lib/tremendous/models/delivery_status.rb +1 -1
  81. data/lib/tremendous/models/error_model.rb +2 -75
  82. data/lib/tremendous/models/field.rb +2 -75
  83. data/lib/tremendous/models/fraud_config_allow_email.rb +2 -75
  84. data/lib/tremendous/models/fraud_config_country.rb +2 -75
  85. data/lib/tremendous/models/fraud_config_country_update_list.rb +2 -75
  86. data/lib/tremendous/models/fraud_config_ip.rb +2 -75
  87. data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +2 -75
  88. data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +2 -75
  89. data/lib/tremendous/models/fraud_config_review_email.rb +2 -75
  90. data/lib/tremendous/models/fraud_config_review_vpn.rb +2 -75
  91. data/lib/tremendous/models/fraud_generic_response.rb +2 -75
  92. data/lib/tremendous/models/fraud_review.rb +3 -76
  93. data/lib/tremendous/models/fraud_review_base.rb +3 -76
  94. data/lib/tremendous/models/fraud_review_geo.rb +2 -75
  95. data/lib/tremendous/models/fraud_review_list_item.rb +3 -76
  96. data/lib/tremendous/models/fraud_review_reason.rb +1 -1
  97. data/lib/tremendous/models/fraud_review_redemption_method.rb +1 -1
  98. data/lib/tremendous/models/fraud_review_related_rewards.rb +2 -75
  99. data/lib/tremendous/models/fraud_review_risk.rb +1 -1
  100. data/lib/tremendous/models/fraud_review_status.rb +1 -1
  101. data/lib/tremendous/models/fraud_rule200_response.rb +2 -75
  102. data/lib/tremendous/models/fraud_rule_request.rb +2 -75
  103. data/lib/tremendous/models/fraud_rule_request_config.rb +3 -4
  104. data/lib/tremendous/models/fraud_rule_type.rb +1 -1
  105. data/lib/tremendous/models/fraud_rules_list_item.rb +2 -75
  106. data/lib/tremendous/models/funding_source.rb +3 -76
  107. data/lib/tremendous/models/generate_reward_link200_response.rb +2 -75
  108. data/lib/tremendous/models/generate_reward_link200_response_reward.rb +2 -75
  109. data/lib/tremendous/models/get_fraud_review200_response.rb +2 -75
  110. data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +2 -75
  111. data/lib/tremendous/models/get_fraud_review200_response_fraud_review_related_rewards.rb +2 -75
  112. data/lib/tremendous/models/get_funding_source200_response.rb +2 -75
  113. data/lib/tremendous/models/get_member200_response.rb +2 -75
  114. data/lib/tremendous/models/get_member200_response_member.rb +2 -75
  115. data/lib/tremendous/models/get_member200_response_member_events_inner.rb +2 -75
  116. data/lib/tremendous/models/get_order200_response.rb +2 -75
  117. data/lib/tremendous/models/get_organization200_response.rb +2 -75
  118. data/lib/tremendous/models/get_product_response.rb +2 -75
  119. data/lib/tremendous/models/get_reward200_response.rb +2 -75
  120. data/lib/tremendous/models/inline_object.rb +2 -75
  121. data/lib/tremendous/models/invoice.rb +4 -77
  122. data/lib/tremendous/models/invoice_response.rb +164 -0
  123. data/lib/tremendous/models/invoice_response_invoice.rb +370 -0
  124. data/lib/tremendous/models/list_balance_transactions200_response.rb +2 -75
  125. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +2 -75
  126. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb +2 -75
  127. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb +2 -75
  128. data/lib/tremendous/models/list_campaigns200_response.rb +2 -75
  129. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +4 -77
  130. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_auto_add_product_rule.rb +2 -75
  131. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb +2 -75
  132. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_products_inner.rb +102 -0
  133. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +2 -75
  134. data/lib/tremendous/models/list_connected_organization_members200_response.rb +2 -75
  135. data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner.rb +2 -75
  136. data/lib/tremendous/models/list_connected_organization_members200_response_connected_organization_members_inner_member.rb +2 -75
  137. data/lib/tremendous/models/list_connected_organizations200_response.rb +2 -75
  138. data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner.rb +2 -75
  139. data/lib/tremendous/models/list_connected_organizations200_response_connected_organizations_inner_organization.rb +2 -75
  140. data/lib/tremendous/models/list_fields200_response.rb +2 -75
  141. data/lib/tremendous/models/list_fields200_response_fields_inner.rb +2 -75
  142. data/lib/tremendous/models/list_fields200_response_fields_inner_data.rb +2 -75
  143. data/lib/tremendous/models/list_forex_response.rb +2 -75
  144. data/lib/tremendous/models/list_fraud_reviews200_response.rb +2 -75
  145. data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +2 -75
  146. data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner_geo.rb +2 -75
  147. data/lib/tremendous/models/list_fraud_rules200_response.rb +2 -75
  148. data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +2 -75
  149. data/lib/tremendous/models/list_funding_sources200_response.rb +2 -75
  150. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +3 -76
  151. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +17 -78
  152. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +2 -75
  153. data/lib/tremendous/models/list_invoices200_response.rb +2 -75
  154. data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +4 -77
  155. data/lib/tremendous/models/list_members200_response.rb +2 -75
  156. data/lib/tremendous/models/list_members200_response_members_inner.rb +2 -75
  157. data/lib/tremendous/models/list_orders200_response.rb +2 -75
  158. data/lib/tremendous/models/list_orders200_response_orders_inner.rb +3 -76
  159. data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +2 -75
  160. data/lib/tremendous/models/list_orders200_response_orders_inner_payment_refund.rb +2 -75
  161. data/lib/tremendous/models/list_organizations200_response.rb +2 -75
  162. data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +2 -75
  163. data/lib/tremendous/models/list_products_response.rb +2 -75
  164. data/lib/tremendous/models/list_products_response_products_inner.rb +4 -77
  165. data/lib/tremendous/models/list_products_response_products_inner_countries_inner.rb +2 -75
  166. data/lib/tremendous/models/list_products_response_products_inner_documents.rb +2 -75
  167. data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +2 -75
  168. data/lib/tremendous/models/list_products_response_products_inner_skus_inner.rb +61 -81
  169. data/lib/tremendous/models/list_rewards200_response.rb +2 -75
  170. data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +2 -75
  171. data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +2 -75
  172. data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +2 -75
  173. data/lib/tremendous/models/list_rewards200_response_rewards_inner_recipient.rb +2 -75
  174. data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +2 -75
  175. data/lib/tremendous/models/list_rewards401_response.rb +2 -75
  176. data/lib/tremendous/models/list_rewards401_response_errors.rb +2 -75
  177. data/lib/tremendous/models/list_roles200_response.rb +2 -75
  178. data/lib/tremendous/models/list_roles200_response_roles_inner.rb +2 -75
  179. data/lib/tremendous/models/list_topups200_response.rb +2 -75
  180. data/lib/tremendous/models/list_topups200_response_topups_inner.rb +3 -76
  181. data/lib/tremendous/models/list_webhook_events200_response.rb +2 -75
  182. data/lib/tremendous/models/list_webhooks200_response.rb +2 -75
  183. data/lib/tremendous/models/list_webhooks200_response_webhooks_inner.rb +2 -75
  184. data/lib/tremendous/models/member.rb +2 -75
  185. data/lib/tremendous/models/member_base.rb +2 -75
  186. data/lib/tremendous/models/member_with_events.rb +2 -75
  187. data/lib/tremendous/models/member_without_events.rb +2 -75
  188. data/lib/tremendous/models/{fraud_rule400_response.rb → member_without_events_response.rb} +20 -103
  189. data/lib/tremendous/models/member_without_events_response_member.rb +311 -0
  190. data/lib/tremendous/models/order.rb +4 -77
  191. data/lib/tremendous/models/order_base.rb +3 -76
  192. data/lib/tremendous/models/order_base_payment.rb +2 -75
  193. data/lib/tremendous/models/order_status.rb +1 -1
  194. data/lib/tremendous/models/order_with_link.rb +3 -76
  195. data/lib/tremendous/models/order_with_link_rewards_inner.rb +2 -75
  196. data/lib/tremendous/models/order_without_link.rb +4 -77
  197. data/lib/tremendous/models/organization.rb +2 -75
  198. data/lib/tremendous/models/organization_response.rb +147 -0
  199. data/lib/tremendous/models/organization_response_organization.rb +285 -0
  200. data/lib/tremendous/models/payment_details.rb +2 -75
  201. data/lib/tremendous/models/payment_details_refund.rb +2 -75
  202. data/lib/tremendous/models/payout.rb +2 -75
  203. data/lib/tremendous/models/product.rb +4 -77
  204. data/lib/tremendous/models/product_documents.rb +2 -75
  205. data/lib/tremendous/models/recipient.rb +2 -75
  206. data/lib/tremendous/models/refund_details.rb +2 -75
  207. data/lib/tremendous/models/report.rb +2 -75
  208. data/lib/tremendous/models/{delete_fraud_rule200_response.rb → report_response.rb} +25 -89
  209. data/lib/tremendous/models/resend_reward_request.rb +2 -75
  210. data/lib/tremendous/models/review_country.rb +2 -75
  211. data/lib/tremendous/models/review_country1.rb +2 -75
  212. data/lib/tremendous/models/review_email.rb +2 -75
  213. data/lib/tremendous/models/review_ip.rb +2 -75
  214. data/lib/tremendous/models/review_redeemed_rewards_amount.rb +2 -75
  215. data/lib/tremendous/models/review_redeemed_rewards_count.rb +2 -75
  216. data/lib/tremendous/models/review_vpn.rb +2 -75
  217. data/lib/tremendous/models/reward.rb +2 -75
  218. data/lib/tremendous/models/reward_base.rb +2 -75
  219. data/lib/tremendous/models/reward_base_custom_fields_inner.rb +2 -75
  220. data/lib/tremendous/models/reward_for_order_create.rb +2 -75
  221. data/lib/tremendous/models/reward_link.rb +2 -75
  222. data/lib/tremendous/models/{inline_object1.rb → reward_link_response.rb} +5 -78
  223. data/lib/tremendous/models/reward_link_response_reward.rb +180 -0
  224. data/lib/tremendous/models/reward_response.rb +164 -0
  225. data/lib/tremendous/models/{order_without_link_rewards_inner.rb → reward_response_reward.rb} +4 -77
  226. data/lib/tremendous/models/reward_token.rb +2 -75
  227. data/lib/tremendous/models/reward_token_response.rb +164 -0
  228. data/lib/tremendous/models/{inline_object1_reward.rb → reward_token_response_reward.rb} +4 -77
  229. data/lib/tremendous/models/reward_value.rb +2 -75
  230. data/lib/tremendous/models/reward_with_link.rb +2 -75
  231. data/lib/tremendous/models/reward_with_link_delivery.rb +2 -75
  232. data/lib/tremendous/models/reward_without_link.rb +2 -75
  233. data/lib/tremendous/models/reward_without_link_delivery.rb +2 -75
  234. data/lib/tremendous/models/role.rb +2 -75
  235. data/lib/tremendous/models/simulate_webhook_request.rb +2 -75
  236. data/lib/tremendous/models/single_reward_order.rb +2 -75
  237. data/lib/tremendous/models/single_reward_order_payment.rb +2 -75
  238. data/lib/tremendous/models/single_reward_order_reward.rb +2 -75
  239. data/lib/tremendous/models/single_reward_order_reward_custom_fields_inner.rb +2 -75
  240. data/lib/tremendous/models/single_reward_order_reward_delivery.rb +2 -75
  241. data/lib/tremendous/models/single_reward_order_reward_delivery_meta.rb +2 -75
  242. data/lib/tremendous/models/single_reward_order_with_link.rb +2 -75
  243. data/lib/tremendous/models/single_reward_order_with_link_order.rb +3 -76
  244. data/lib/tremendous/models/single_reward_order_without_link.rb +2 -75
  245. data/lib/tremendous/models/single_reward_order_without_link_order.rb +4 -77
  246. data/lib/tremendous/models/topup.rb +3 -76
  247. data/lib/tremendous/models/topup_create_request.rb +2 -75
  248. data/lib/tremendous/models/topup_response.rb +147 -0
  249. data/lib/tremendous/models/update_campaign.rb +4 -77
  250. data/lib/tremendous/models/update_campaign_request.rb +4 -77
  251. data/lib/tremendous/models/update_fraud_rule_list_request.rb +2 -75
  252. data/lib/tremendous/models/update_fraud_rule_list_request_config.rb +7 -8
  253. data/lib/tremendous/models/update_member.rb +2 -75
  254. data/lib/tremendous/models/update_member_request.rb +2 -75
  255. data/lib/tremendous/models/webhook.rb +2 -75
  256. data/lib/tremendous/models/webhook_post.rb +2 -75
  257. data/lib/tremendous/models/webhook_response.rb +147 -0
  258. data/lib/tremendous/models/{update_fraud_rule_list200_response.rb → webhook_response_webhook.rb} +47 -94
  259. data/lib/tremendous/version.rb +1 -1
  260. data/lib/tremendous.rb +28 -15
  261. metadata +28 -15
  262. data/lib/tremendous/models/allow_email1.rb +0 -250
  263. data/lib/tremendous/models/allow_ip1.rb +0 -250
  264. data/lib/tremendous/models/fraud_rule422_response.rb +0 -247
  265. data/lib/tremendous/models/list_rewards429_response.rb +0 -247
  266. data/lib/tremendous/models/resend_reward422_response.rb +0 -247
  267. data/lib/tremendous/models/review_email1.rb +0 -255
  268. data/lib/tremendous/models/review_ip1.rb +0 -250
@@ -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.12.0
9
+ Generator version: 7.25.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Tremendous
17
17
  # The redemption link for a reward.
18
- class RewardLink
18
+ class RewardLink < ApiModelBase
19
19
  # Tremendous ID of the reward
20
20
  attr_accessor :id
21
21
 
@@ -159,61 +159,6 @@ module Tremendous
159
159
  new(transformed_hash)
160
160
  end
161
161
 
162
- # Deserializes the data based on type
163
- # @param string type Data type
164
- # @param string value Value to be deserialized
165
- # @return [Object] Deserialized data
166
- def self._deserialize(type, value)
167
- case type.to_sym
168
- when :Time
169
- Time.parse(value)
170
- when :Date
171
- Date.parse(value)
172
- when :String
173
- value.to_s
174
- when :Integer
175
- value.to_i
176
- when :Float
177
- value.to_f
178
- when :Boolean
179
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
180
- true
181
- else
182
- false
183
- end
184
- when :Object
185
- # generic object (usually a Hash), return directly
186
- value
187
- when /\AArray<(?<inner_type>.+)>\z/
188
- inner_type = Regexp.last_match[:inner_type]
189
- value.map { |v| _deserialize(inner_type, v) }
190
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
191
- k_type = Regexp.last_match[:k_type]
192
- v_type = Regexp.last_match[:v_type]
193
- {}.tap do |hash|
194
- value.each do |k, v|
195
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
196
- end
197
- end
198
- else # model
199
- # models (e.g. Pet) or oneOf
200
- klass = Tremendous.const_get(type)
201
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
202
- end
203
- end
204
-
205
- # Returns the string representation of the object
206
- # @return [String] String presentation of the object
207
- def to_s
208
- to_hash.to_s
209
- end
210
-
211
- # to_body is an alias to to_hash (backward compatibility)
212
- # @return [Hash] Returns the object in the form of hash
213
- def to_body
214
- to_hash
215
- end
216
-
217
162
  # Returns the object in the form of hash
218
163
  # @return [Hash] Returns the object in the form of hash
219
164
  def to_hash
@@ -230,24 +175,6 @@ module Tremendous
230
175
  hash
231
176
  end
232
177
 
233
- # Outputs non-array value in the form of hash
234
- # For object, use to_hash. Otherwise, just return the value
235
- # @param [Object] value Any valid value
236
- # @return [Hash] Returns the value in the form of hash
237
- def _to_hash(value)
238
- if value.is_a?(Array)
239
- value.compact.map { |v| _to_hash(v) }
240
- elsif value.is_a?(Hash)
241
- {}.tap do |hash|
242
- value.each { |k, v| hash[k] = _to_hash(v) }
243
- end
244
- elsif value.respond_to? :to_hash
245
- value.to_hash
246
- else
247
- value
248
- end
249
- end
250
-
251
178
  end
252
179
 
253
180
  end
@@ -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.12.0
9
+ Generator version: 7.25.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Tremendous
17
- class InlineObject1
17
+ class RewardLinkResponse < ApiModelBase
18
18
  attr_accessor :reward
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -37,7 +37,7 @@ module Tremendous
37
37
  # Attribute type mapping.
38
38
  def self.openapi_types
39
39
  {
40
- :'reward' => :'InlineObject1Reward'
40
+ :'reward' => :'RewardLinkResponseReward'
41
41
  }
42
42
  end
43
43
 
@@ -51,14 +51,14 @@ module Tremendous
51
51
  # @param [Hash] attributes Model attributes in the form of hash
52
52
  def initialize(attributes = {})
53
53
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::InlineObject1` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::RewardLinkResponse` initialize method"
55
55
  end
56
56
 
57
57
  # check to see if the attribute exists and convert string to symbol for hash key
58
58
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
60
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::InlineObject1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::RewardLinkResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
62
  end
63
63
  h[k.to_sym] = v
64
64
  }
@@ -143,61 +143,6 @@ module Tremendous
143
143
  new(transformed_hash)
144
144
  end
145
145
 
146
- # Deserializes the data based on type
147
- # @param string type Data type
148
- # @param string value Value to be deserialized
149
- # @return [Object] Deserialized data
150
- def self._deserialize(type, value)
151
- case type.to_sym
152
- when :Time
153
- Time.parse(value)
154
- when :Date
155
- Date.parse(value)
156
- when :String
157
- value.to_s
158
- when :Integer
159
- value.to_i
160
- when :Float
161
- value.to_f
162
- when :Boolean
163
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
- true
165
- else
166
- false
167
- end
168
- when :Object
169
- # generic object (usually a Hash), return directly
170
- value
171
- when /\AArray<(?<inner_type>.+)>\z/
172
- inner_type = Regexp.last_match[:inner_type]
173
- value.map { |v| _deserialize(inner_type, v) }
174
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
- k_type = Regexp.last_match[:k_type]
176
- v_type = Regexp.last_match[:v_type]
177
- {}.tap do |hash|
178
- value.each do |k, v|
179
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
- end
181
- end
182
- else # model
183
- # models (e.g. Pet) or oneOf
184
- klass = Tremendous.const_get(type)
185
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
- end
187
- end
188
-
189
- # Returns the string representation of the object
190
- # @return [String] String presentation of the object
191
- def to_s
192
- to_hash.to_s
193
- end
194
-
195
- # to_body is an alias to to_hash (backward compatibility)
196
- # @return [Hash] Returns the object in the form of hash
197
- def to_body
198
- to_hash
199
- end
200
-
201
146
  # Returns the object in the form of hash
202
147
  # @return [Hash] Returns the object in the form of hash
203
148
  def to_hash
@@ -214,24 +159,6 @@ module Tremendous
214
159
  hash
215
160
  end
216
161
 
217
- # Outputs non-array value in the form of hash
218
- # For object, use to_hash. Otherwise, just return the value
219
- # @param [Object] value Any valid value
220
- # @return [Hash] Returns the value in the form of hash
221
- def _to_hash(value)
222
- if value.is_a?(Array)
223
- value.compact.map { |v| _to_hash(v) }
224
- elsif value.is_a?(Hash)
225
- {}.tap do |hash|
226
- value.each { |k, v| hash[k] = _to_hash(v) }
227
- end
228
- elsif value.respond_to? :to_hash
229
- value.to_hash
230
- else
231
- value
232
- end
233
- end
234
-
235
162
  end
236
163
 
237
164
  end
@@ -0,0 +1,180 @@
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
+ # The redemption link for a reward.
18
+ class RewardLinkResponseReward < ApiModelBase
19
+ # Tremendous ID of the reward
20
+ attr_accessor :id
21
+
22
+ # Link to redeem the reward at. You need to deliver this link to the recipient.
23
+ attr_accessor :link
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'id' => :'id',
29
+ :'link' => :'link'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'id' => :'String',
47
+ :'link' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::RewardLinkResponseReward` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ acceptable_attribute_map = self.class.acceptable_attribute_map
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!acceptable_attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::RewardLinkResponseReward`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.key?(:'link')
78
+ self.link = attributes[:'link']
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
+ invalid_properties = Array.new
87
+ pattern = Regexp.new(/[A-Z0-9]{4,20}/)
88
+ if !@id.nil? && @id !~ pattern
89
+ invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ return false if !@id.nil? && @id !~ Regexp.new(/[A-Z0-9]{4,20}/)
100
+ true
101
+ end
102
+
103
+ # Custom attribute writer method with validation
104
+ # @param [Object] id Value to be assigned
105
+ def id=(id)
106
+ if id.nil?
107
+ fail ArgumentError, 'id cannot be nil'
108
+ end
109
+
110
+ pattern = Regexp.new(/[A-Z0-9]{4,20}/)
111
+ if id !~ pattern
112
+ fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
113
+ end
114
+
115
+ @id = id
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ id == o.id &&
124
+ link == o.link
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [id, link].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ attributes = attributes.transform_keys(&:to_sym)
145
+ transformed_hash = {}
146
+ openapi_types.each_pair do |key, type|
147
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
148
+ transformed_hash["#{key}"] = nil
149
+ elsif type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[attribute_map[key]].is_a?(Array)
153
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
154
+ end
155
+ elsif !attributes[attribute_map[key]].nil?
156
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
157
+ end
158
+ end
159
+ new(transformed_hash)
160
+ end
161
+
162
+ # Returns the object in the form of hash
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_hash
165
+ hash = {}
166
+ self.class.attribute_map.each_pair do |attr, param|
167
+ value = self.send(attr)
168
+ if value.nil?
169
+ is_nullable = self.class.openapi_nullable.include?(attr)
170
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
171
+ end
172
+
173
+ hash[param] = _to_hash(value)
174
+ end
175
+ hash
176
+ end
177
+
178
+ end
179
+
180
+ end
@@ -0,0 +1,164 @@
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 RewardResponse < ApiModelBase
18
+ attr_accessor :reward
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'reward' => :'reward'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'reward' => :'RewardResponseReward'
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::RewardResponse` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::RewardResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'reward')
67
+ self.reward = attributes[:'reward']
68
+ else
69
+ self.reward = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @reward.nil?
79
+ invalid_properties.push('invalid value for "reward", reward cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @reward.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] reward Value to be assigned
95
+ def reward=(reward)
96
+ if reward.nil?
97
+ fail ArgumentError, 'reward cannot be nil'
98
+ end
99
+
100
+ @reward = reward
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ reward == o.reward
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [reward].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -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.12.0
9
+ Generator version: 7.25.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Tremendous
17
17
  # A single reward, sent to a recipient. A reward is always part of an order. Either `products` or `campaign_id` must be specified.
18
- class OrderWithoutLinkRewardsInner
18
+ class RewardResponseReward < ApiModelBase
19
19
  # Tremendous ID of the reward
20
20
  attr_accessor :id
21
21
 
@@ -101,14 +101,14 @@ module Tremendous
101
101
  # @param [Hash] attributes Model attributes in the form of hash
102
102
  def initialize(attributes = {})
103
103
  if (!attributes.is_a?(Hash))
104
- fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::OrderWithoutLinkRewardsInner` initialize method"
104
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Tremendous::RewardResponseReward` initialize method"
105
105
  end
106
106
 
107
107
  # check to see if the attribute exists and convert string to symbol for hash key
108
108
  acceptable_attribute_map = self.class.acceptable_attribute_map
109
109
  attributes = attributes.each_with_object({}) { |(k, v), h|
110
110
  if (!acceptable_attribute_map.key?(k.to_sym))
111
- fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::OrderWithoutLinkRewardsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::RewardResponseReward`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
112
112
  end
113
113
  h[k.to_sym] = v
114
114
  }
@@ -308,61 +308,6 @@ module Tremendous
308
308
  new(transformed_hash)
309
309
  end
310
310
 
311
- # Deserializes the data based on type
312
- # @param string type Data type
313
- # @param string value Value to be deserialized
314
- # @return [Object] Deserialized data
315
- def self._deserialize(type, value)
316
- case type.to_sym
317
- when :Time
318
- Time.parse(value)
319
- when :Date
320
- Date.parse(value)
321
- when :String
322
- value.to_s
323
- when :Integer
324
- value.to_i
325
- when :Float
326
- value.to_f
327
- when :Boolean
328
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
329
- true
330
- else
331
- false
332
- end
333
- when :Object
334
- # generic object (usually a Hash), return directly
335
- value
336
- when /\AArray<(?<inner_type>.+)>\z/
337
- inner_type = Regexp.last_match[:inner_type]
338
- value.map { |v| _deserialize(inner_type, v) }
339
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
340
- k_type = Regexp.last_match[:k_type]
341
- v_type = Regexp.last_match[:v_type]
342
- {}.tap do |hash|
343
- value.each do |k, v|
344
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
345
- end
346
- end
347
- else # model
348
- # models (e.g. Pet) or oneOf
349
- klass = Tremendous.const_get(type)
350
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
351
- end
352
- end
353
-
354
- # Returns the string representation of the object
355
- # @return [String] String presentation of the object
356
- def to_s
357
- to_hash.to_s
358
- end
359
-
360
- # to_body is an alias to to_hash (backward compatibility)
361
- # @return [Hash] Returns the object in the form of hash
362
- def to_body
363
- to_hash
364
- end
365
-
366
311
  # Returns the object in the form of hash
367
312
  # @return [Hash] Returns the object in the form of hash
368
313
  def to_hash
@@ -379,24 +324,6 @@ module Tremendous
379
324
  hash
380
325
  end
381
326
 
382
- # Outputs non-array value in the form of hash
383
- # For object, use to_hash. Otherwise, just return the value
384
- # @param [Object] value Any valid value
385
- # @return [Hash] Returns the value in the form of hash
386
- def _to_hash(value)
387
- if value.is_a?(Array)
388
- value.compact.map { |v| _to_hash(v) }
389
- elsif value.is_a?(Hash)
390
- {}.tap do |hash|
391
- value.each { |k, v| hash[k] = _to_hash(v) }
392
- end
393
- elsif value.respond_to? :to_hash
394
- value.to_hash
395
- else
396
- value
397
- end
398
- end
399
-
400
327
  end
401
328
 
402
329
  end