tremendous_ruby 5.7.0 → 5.9.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 (208) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tremendous/api/tremendous_api.rb +14 -14
  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 +14 -5
  11. data/lib/tremendous/models/balance_transaction_order.rb +256 -0
  12. data/lib/tremendous/models/balance_transaction_order_payment.rb +358 -0
  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/create_api_key200_response.rb +1 -1
  18. data/lib/tremendous/models/create_campaign201_response.rb +1 -1
  19. data/lib/tremendous/models/create_campaign_request.rb +1 -1
  20. data/lib/tremendous/models/create_invoice200_response.rb +1 -1
  21. data/lib/tremendous/models/create_invoice_request.rb +1 -1
  22. data/lib/tremendous/models/create_member.rb +1 -1
  23. data/lib/tremendous/models/create_member200_response.rb +1 -1
  24. data/lib/tremendous/models/create_member_request.rb +1 -1
  25. data/lib/tremendous/models/create_order200_response.rb +1 -1
  26. data/lib/tremendous/models/create_order200_response_order.rb +1 -1
  27. data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +1 -1
  28. data/lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb +1 -1
  29. data/lib/tremendous/models/create_order_request.rb +1 -1
  30. data/lib/tremendous/models/create_organization.rb +1 -1
  31. data/lib/tremendous/models/create_organization200_response.rb +1 -1
  32. data/lib/tremendous/models/create_organization200_response_organization.rb +1 -1
  33. data/lib/tremendous/models/create_organization_for_response.rb +1 -1
  34. data/lib/tremendous/models/create_organization_properties.rb +1 -1
  35. data/lib/tremendous/models/create_organization_request.rb +1 -1
  36. data/lib/tremendous/models/create_organization_request_copy_settings.rb +1 -1
  37. data/lib/tremendous/models/create_report201_response.rb +1 -1
  38. data/lib/tremendous/models/create_report201_response_report.rb +2 -2
  39. data/lib/tremendous/models/create_report_request.rb +1 -1
  40. data/lib/tremendous/models/create_report_request_filters.rb +1 -1
  41. data/lib/tremendous/models/create_report_request_filters_digital_rewards.rb +1 -1
  42. data/lib/tremendous/models/create_report_request_filters_digital_rewards_amount.rb +1 -1
  43. data/lib/tremendous/models/create_report_request_filters_digital_rewards_created_at.rb +1 -1
  44. data/lib/tremendous/models/create_webhook200_response.rb +1 -1
  45. data/lib/tremendous/models/create_webhook_request.rb +1 -1
  46. data/lib/tremendous/models/currency_codes.rb +1 -1
  47. data/lib/tremendous/models/custom_field.rb +1 -1
  48. data/lib/tremendous/models/delete_fraud_rule200_response.rb +1 -1
  49. data/lib/tremendous/models/delivery_details.rb +1 -1
  50. data/lib/tremendous/models/delivery_details_with_link.rb +1 -1
  51. data/lib/tremendous/models/delivery_metadata.rb +236 -0
  52. data/lib/tremendous/models/delivery_method.rb +1 -1
  53. data/lib/tremendous/models/delivery_status.rb +1 -1
  54. data/lib/tremendous/models/error_model.rb +1 -1
  55. data/lib/tremendous/models/field.rb +1 -1
  56. data/lib/tremendous/models/fraud_config_allow_email.rb +1 -1
  57. data/lib/tremendous/models/fraud_config_country.rb +1 -1
  58. data/lib/tremendous/models/fraud_config_country_update_list.rb +1 -1
  59. data/lib/tremendous/models/fraud_config_ip.rb +1 -1
  60. data/lib/tremendous/models/fraud_config_redeemed_rewards_amount.rb +1 -1
  61. data/lib/tremendous/models/fraud_config_redeemed_rewards_count.rb +1 -1
  62. data/lib/tremendous/models/fraud_config_review_email.rb +1 -1
  63. data/lib/tremendous/models/fraud_generic_response.rb +1 -1
  64. data/lib/tremendous/models/fraud_review.rb +25 -3
  65. data/lib/tremendous/models/fraud_review_geo.rb +1 -1
  66. data/lib/tremendous/models/fraud_review_list_item.rb +2 -2
  67. data/lib/tremendous/models/fraud_review_reason.rb +3 -2
  68. data/lib/tremendous/models/fraud_review_redemption_method.rb +1 -1
  69. data/lib/tremendous/models/fraud_review_related_rewards.rb +1 -1
  70. data/lib/tremendous/models/fraud_review_risk.rb +41 -0
  71. data/lib/tremendous/models/fraud_review_status.rb +1 -1
  72. data/lib/tremendous/models/fraud_rule200_response.rb +1 -1
  73. data/lib/tremendous/models/fraud_rule400_response.rb +1 -1
  74. data/lib/tremendous/models/fraud_rule422_response.rb +1 -1
  75. data/lib/tremendous/models/fraud_rule_request.rb +1 -1
  76. data/lib/tremendous/models/fraud_rule_request_config.rb +1 -1
  77. data/lib/tremendous/models/fraud_rule_type.rb +1 -1
  78. data/lib/tremendous/models/fraud_rules_list_item.rb +1 -1
  79. data/lib/tremendous/models/funding_source.rb +1 -1
  80. data/lib/tremendous/models/generate_reward_link200_response.rb +1 -1
  81. data/lib/tremendous/models/generate_reward_link200_response_reward.rb +1 -1
  82. data/lib/tremendous/models/generate_reward_link403_response.rb +1 -1
  83. data/lib/tremendous/models/generate_reward_token200_response.rb +1 -1
  84. data/lib/tremendous/models/generate_reward_token200_response_reward.rb +1 -1
  85. data/lib/tremendous/models/get_fraud_review200_response.rb +1 -1
  86. data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +25 -3
  87. data/lib/tremendous/models/get_fraud_review200_response_fraud_review_geo.rb +1 -1
  88. data/lib/tremendous/models/get_fraud_review200_response_fraud_review_related_rewards.rb +1 -1
  89. data/lib/tremendous/models/get_funding_source200_response.rb +1 -1
  90. data/lib/tremendous/models/get_member200_response.rb +1 -1
  91. data/lib/tremendous/models/get_member200_response_member.rb +1 -1
  92. data/lib/tremendous/models/get_member200_response_member_events_inner.rb +1 -1
  93. data/lib/tremendous/models/get_order200_response.rb +221 -0
  94. data/lib/tremendous/models/get_organization200_response.rb +1 -1
  95. data/lib/tremendous/models/get_product_response.rb +1 -1
  96. data/lib/tremendous/models/get_reward200_response.rb +1 -1
  97. data/lib/tremendous/models/invoice.rb +1 -1
  98. data/lib/tremendous/models/list_balance_transactions200_response.rb +1 -1
  99. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +14 -5
  100. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb +256 -0
  101. data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb +358 -0
  102. data/lib/tremendous/models/list_campaigns200_response.rb +1 -1
  103. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb +1 -1
  104. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb +2 -2
  105. data/lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb +3 -3
  106. data/lib/tremendous/models/list_fields200_response.rb +1 -1
  107. data/lib/tremendous/models/list_fields200_response_fields_inner.rb +1 -1
  108. data/lib/tremendous/models/list_forex_response.rb +1 -1
  109. data/lib/tremendous/models/list_fraud_reviews200_response.rb +1 -1
  110. data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +2 -2
  111. data/lib/tremendous/models/list_fraud_rules200_response.rb +1 -1
  112. data/lib/tremendous/models/list_fraud_rules200_response_fraud_rules_inner.rb +1 -1
  113. data/lib/tremendous/models/list_funding_sources200_response.rb +1 -1
  114. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb +1 -1
  115. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb +1 -1
  116. data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +1 -1
  117. data/lib/tremendous/models/list_invoices200_response.rb +1 -1
  118. data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +1 -1
  119. data/lib/tremendous/models/list_members200_response.rb +1 -1
  120. data/lib/tremendous/models/list_members200_response_members_inner.rb +1 -1
  121. data/lib/tremendous/models/list_orders200_response.rb +1 -1
  122. data/lib/tremendous/models/list_orders200_response_orders_inner.rb +1 -1
  123. data/lib/tremendous/models/list_orders200_response_orders_inner_payment.rb +65 -8
  124. data/lib/tremendous/models/list_orders200_response_orders_inner_payment_refund.rb +1 -1
  125. data/lib/tremendous/models/list_organizations200_response.rb +1 -1
  126. data/lib/tremendous/models/list_organizations200_response_organizations_inner.rb +1 -1
  127. data/lib/tremendous/models/list_products_response.rb +1 -1
  128. data/lib/tremendous/models/list_products_response_products_inner.rb +3 -3
  129. data/lib/tremendous/models/list_products_response_products_inner_countries_inner.rb +1 -1
  130. data/lib/tremendous/models/list_products_response_products_inner_images_inner.rb +1 -1
  131. data/lib/tremendous/models/list_products_response_products_inner_skus_inner.rb +1 -1
  132. data/lib/tremendous/models/list_rewards200_response.rb +1 -1
  133. data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +1 -1
  134. data/lib/tremendous/models/list_rewards200_response_rewards_inner_custom_fields_inner.rb +1 -1
  135. data/lib/tremendous/models/list_rewards200_response_rewards_inner_delivery.rb +1 -1
  136. data/lib/tremendous/models/list_rewards200_response_rewards_inner_recipient.rb +1 -1
  137. data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +1 -1
  138. data/lib/tremendous/models/list_rewards401_response.rb +1 -1
  139. data/lib/tremendous/models/list_rewards401_response_errors.rb +1 -1
  140. data/lib/tremendous/models/list_rewards429_response.rb +1 -1
  141. data/lib/tremendous/models/list_roles200_response.rb +1 -1
  142. data/lib/tremendous/models/list_roles200_response_roles_inner.rb +1 -1
  143. data/lib/tremendous/models/list_webhook_events200_response.rb +1 -1
  144. data/lib/tremendous/models/list_webhooks200_response.rb +1 -1
  145. data/lib/tremendous/models/list_webhooks200_response_webhooks_inner.rb +1 -1
  146. data/lib/tremendous/models/member.rb +1 -1
  147. data/lib/tremendous/models/member_base.rb +1 -1
  148. data/lib/tremendous/models/member_with_events.rb +1 -1
  149. data/lib/tremendous/models/member_without_events.rb +1 -1
  150. data/lib/tremendous/models/order.rb +1 -1
  151. data/lib/tremendous/models/order_base.rb +1 -1
  152. data/lib/tremendous/models/order_base_payment.rb +65 -8
  153. data/lib/tremendous/models/order_status.rb +1 -1
  154. data/lib/tremendous/models/order_with_link.rb +1 -1
  155. data/lib/tremendous/models/order_with_link_rewards_inner.rb +1 -1
  156. data/lib/tremendous/models/order_without_link.rb +1 -1
  157. data/lib/tremendous/models/order_without_link_rewards_inner.rb +1 -1
  158. data/lib/tremendous/models/organization.rb +1 -1
  159. data/lib/tremendous/models/payment_details.rb +65 -8
  160. data/lib/tremendous/models/payment_details_refund.rb +1 -1
  161. data/lib/tremendous/models/payout.rb +1 -1
  162. data/lib/tremendous/models/product.rb +3 -3
  163. data/lib/tremendous/models/recipient.rb +1 -1
  164. data/lib/tremendous/models/refund_details.rb +1 -1
  165. data/lib/tremendous/models/report.rb +2 -2
  166. data/lib/tremendous/models/resend_reward422_response.rb +1 -1
  167. data/lib/tremendous/models/resend_reward_request.rb +1 -1
  168. data/lib/tremendous/models/review_country.rb +1 -1
  169. data/lib/tremendous/models/review_country1.rb +1 -1
  170. data/lib/tremendous/models/review_email.rb +1 -1
  171. data/lib/tremendous/models/review_email1.rb +1 -1
  172. data/lib/tremendous/models/review_ip.rb +1 -1
  173. data/lib/tremendous/models/review_ip1.rb +1 -1
  174. data/lib/tremendous/models/review_redeemed_rewards_amount.rb +1 -1
  175. data/lib/tremendous/models/review_redeemed_rewards_count.rb +1 -1
  176. data/lib/tremendous/models/reward.rb +1 -1
  177. data/lib/tremendous/models/reward_base.rb +1 -1
  178. data/lib/tremendous/models/reward_base_custom_fields_inner.rb +1 -1
  179. data/lib/tremendous/models/reward_for_order_create.rb +1 -1
  180. data/lib/tremendous/models/reward_link.rb +1 -1
  181. data/lib/tremendous/models/reward_token.rb +1 -1
  182. data/lib/tremendous/models/reward_value.rb +1 -1
  183. data/lib/tremendous/models/reward_with_link.rb +1 -1
  184. data/lib/tremendous/models/reward_with_link_delivery.rb +1 -1
  185. data/lib/tremendous/models/reward_without_link.rb +1 -1
  186. data/lib/tremendous/models/reward_without_link_delivery.rb +1 -1
  187. data/lib/tremendous/models/role.rb +1 -1
  188. data/lib/tremendous/models/simulate_webhook_request.rb +1 -1
  189. data/lib/tremendous/models/single_reward_order.rb +1 -1
  190. data/lib/tremendous/models/single_reward_order_payment.rb +1 -1
  191. data/lib/tremendous/models/single_reward_order_reward.rb +1 -1
  192. data/lib/tremendous/models/single_reward_order_reward_custom_fields_inner.rb +1 -1
  193. data/lib/tremendous/models/single_reward_order_reward_delivery.rb +14 -5
  194. data/lib/tremendous/models/single_reward_order_reward_delivery_meta.rb +236 -0
  195. data/lib/tremendous/models/single_reward_order_with_link.rb +1 -1
  196. data/lib/tremendous/models/single_reward_order_with_link_order.rb +1 -1
  197. data/lib/tremendous/models/single_reward_order_without_link.rb +1 -1
  198. data/lib/tremendous/models/single_reward_order_without_link_order.rb +1 -1
  199. data/lib/tremendous/models/update_campaign.rb +1 -1
  200. data/lib/tremendous/models/update_campaign_request.rb +1 -1
  201. data/lib/tremendous/models/update_fraud_rule_list200_response.rb +1 -1
  202. data/lib/tremendous/models/update_fraud_rule_list_request.rb +1 -1
  203. data/lib/tremendous/models/update_fraud_rule_list_request_config.rb +1 -1
  204. data/lib/tremendous/models/webhook.rb +1 -1
  205. data/lib/tremendous/models/webhook_post.rb +1 -1
  206. data/lib/tremendous/version.rb +1 -1
  207. data/lib/tremendous.rb +9 -2
  208. metadata +11 -3
@@ -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
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Fees for the order (in USD)
26
26
  attr_accessor :fees
27
27
 
28
+ # Discount for the order (in USD)
29
+ attr_accessor :discount
30
+
28
31
  attr_accessor :refund
29
32
 
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,6 +36,7 @@ module Tremendous
33
36
  :'subtotal' => :'subtotal',
34
37
  :'total' => :'total',
35
38
  :'fees' => :'fees',
39
+ :'discount' => :'discount',
36
40
  :'refund' => :'refund'
37
41
  }
38
42
  end
@@ -48,6 +52,7 @@ module Tremendous
48
52
  :'subtotal' => :'Float',
49
53
  :'total' => :'Float',
50
54
  :'fees' => :'Float',
55
+ :'discount' => :'Float',
51
56
  :'refund' => :'ListOrders200ResponseOrdersInnerPaymentRefund'
52
57
  }
53
58
  end
@@ -75,14 +80,26 @@ module Tremendous
75
80
 
76
81
  if attributes.key?(:'subtotal')
77
82
  self.subtotal = attributes[:'subtotal']
83
+ else
84
+ self.subtotal = nil
78
85
  end
79
86
 
80
87
  if attributes.key?(:'total')
81
88
  self.total = attributes[:'total']
89
+ else
90
+ self.total = nil
82
91
  end
83
92
 
84
93
  if attributes.key?(:'fees')
85
94
  self.fees = attributes[:'fees']
95
+ else
96
+ self.fees = nil
97
+ end
98
+
99
+ if attributes.key?(:'discount')
100
+ self.discount = attributes[:'discount']
101
+ else
102
+ self.discount = nil
86
103
  end
87
104
 
88
105
  if attributes.key?(:'refund')
@@ -95,18 +112,38 @@ module Tremendous
95
112
  def list_invalid_properties
96
113
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
114
  invalid_properties = Array.new
98
- if !@subtotal.nil? && @subtotal < 0
115
+ if @subtotal.nil?
116
+ invalid_properties.push('invalid value for "subtotal", subtotal cannot be nil.')
117
+ end
118
+
119
+ if @subtotal < 0
99
120
  invalid_properties.push('invalid value for "subtotal", must be greater than or equal to 0.')
100
121
  end
101
122
 
102
- if !@total.nil? && @total < 0
123
+ if @total.nil?
124
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
125
+ end
126
+
127
+ if @total < 0
103
128
  invalid_properties.push('invalid value for "total", must be greater than or equal to 0.')
104
129
  end
105
130
 
106
- if !@fees.nil? && @fees < 0
131
+ if @fees.nil?
132
+ invalid_properties.push('invalid value for "fees", fees cannot be nil.')
133
+ end
134
+
135
+ if @fees < 0
107
136
  invalid_properties.push('invalid value for "fees", must be greater than or equal to 0.')
108
137
  end
109
138
 
139
+ if @discount.nil?
140
+ invalid_properties.push('invalid value for "discount", discount cannot be nil.')
141
+ end
142
+
143
+ if @discount < 0
144
+ invalid_properties.push('invalid value for "discount", must be greater than or equal to 0.')
145
+ end
146
+
110
147
  invalid_properties
111
148
  end
112
149
 
@@ -114,9 +151,14 @@ module Tremendous
114
151
  # @return true if the model is valid
115
152
  def valid?
116
153
  warn '[DEPRECATED] the `valid?` method is obsolete'
117
- return false if !@subtotal.nil? && @subtotal < 0
118
- return false if !@total.nil? && @total < 0
119
- return false if !@fees.nil? && @fees < 0
154
+ return false if @subtotal.nil?
155
+ return false if @subtotal < 0
156
+ return false if @total.nil?
157
+ return false if @total < 0
158
+ return false if @fees.nil?
159
+ return false if @fees < 0
160
+ return false if @discount.nil?
161
+ return false if @discount < 0
120
162
  true
121
163
  end
122
164
 
@@ -162,6 +204,20 @@ module Tremendous
162
204
  @fees = fees
163
205
  end
164
206
 
207
+ # Custom attribute writer method with validation
208
+ # @param [Object] discount Value to be assigned
209
+ def discount=(discount)
210
+ if discount.nil?
211
+ fail ArgumentError, 'discount cannot be nil'
212
+ end
213
+
214
+ if discount < 0
215
+ fail ArgumentError, 'invalid value for "discount", must be greater than or equal to 0.'
216
+ end
217
+
218
+ @discount = discount
219
+ end
220
+
165
221
  # Checks equality by comparing each attribute.
166
222
  # @param [Object] Object to be compared
167
223
  def ==(o)
@@ -170,6 +226,7 @@ module Tremendous
170
226
  subtotal == o.subtotal &&
171
227
  total == o.total &&
172
228
  fees == o.fees &&
229
+ discount == o.discount &&
173
230
  refund == o.refund
174
231
  end
175
232
 
@@ -182,7 +239,7 @@ module Tremendous
182
239
  # Calculates hash code according to all attributes.
183
240
  # @return [Integer] Hash code
184
241
  def hash
185
- [subtotal, total, fees, refund].hash
242
+ [subtotal, total, fees, discount, refund].hash
186
243
  end
187
244
 
188
245
  # 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
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Tremendous
17
- # A product represents one way to payout a reward to it's recipient. Think: * Amazon.com gift card (ID: `OKMHM2X2OHYV`) * Donations to Save the Children (ID: `ESRNAD533W5A`) * Virtual Visa debit card (ID: `Q24BD9EZ332JT`) each of which is one specific product on Tremendous. > 📘 All available products > > See this [list](https://www.tremendous.com/catalog) Products can be limited in their availability to recipients by * geography (field `countries`) * currency (field `currencies`) * amount of the reward (field `skus`) * e.g. adidas gift cards accept any amount between 5 and 200 USD. See the description of each respective parameter for further details.
17
+ # A product represents one way to payout a reward to its recipient. Think: * Amazon.com gift card (ID: `OKMHM2X2OHYV`) * Donations to Save the Children (ID: `ESRNAD533W5A`) * Virtual Visa debit card (ID: `Q24BD9EZ332JT`) each of which is one specific product on Tremendous. > 📘 All available products > > See this [list](https://www.tremendous.com/catalog) Products can be limited in their availability to recipients by * geography (field `countries`) * currency (field `currencies`) * amount of the reward (field `skus`) * e.g. adidas gift cards accept any amount between 5 and 200 USD. See the description of each respective parameter for further details.
18
18
  class ListProductsResponseProductsInner
19
19
  attr_accessor :id
20
20
 
@@ -30,7 +30,7 @@ module Tremendous
30
30
  # Legal disclosures for this product. Can be in HTML format.
31
31
  attr_accessor :disclosure
32
32
 
33
- # Products may are restricted in their usage based on the amount of the reward. The `skus` array defines bands of denominations in which this product may be used for payouts.
33
+ # Products are restricted in their usage based on the amount of the reward. The `skus` array defines bands of denominations in which this product may be used for payouts.
34
34
  attr_accessor :skus
35
35
 
36
36
  # Available currencies for this product
@@ -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
@@ -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
@@ -25,6 +25,9 @@ module Tremendous
25
25
  # Fees for the order (in USD)
26
26
  attr_accessor :fees
27
27
 
28
+ # Discount for the order (in USD)
29
+ attr_accessor :discount
30
+
28
31
  attr_accessor :refund
29
32
 
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,6 +36,7 @@ module Tremendous
33
36
  :'subtotal' => :'subtotal',
34
37
  :'total' => :'total',
35
38
  :'fees' => :'fees',
39
+ :'discount' => :'discount',
36
40
  :'refund' => :'refund'
37
41
  }
38
42
  end
@@ -48,6 +52,7 @@ module Tremendous
48
52
  :'subtotal' => :'Float',
49
53
  :'total' => :'Float',
50
54
  :'fees' => :'Float',
55
+ :'discount' => :'Float',
51
56
  :'refund' => :'PaymentDetailsRefund'
52
57
  }
53
58
  end
@@ -75,14 +80,26 @@ module Tremendous
75
80
 
76
81
  if attributes.key?(:'subtotal')
77
82
  self.subtotal = attributes[:'subtotal']
83
+ else
84
+ self.subtotal = nil
78
85
  end
79
86
 
80
87
  if attributes.key?(:'total')
81
88
  self.total = attributes[:'total']
89
+ else
90
+ self.total = nil
82
91
  end
83
92
 
84
93
  if attributes.key?(:'fees')
85
94
  self.fees = attributes[:'fees']
95
+ else
96
+ self.fees = nil
97
+ end
98
+
99
+ if attributes.key?(:'discount')
100
+ self.discount = attributes[:'discount']
101
+ else
102
+ self.discount = nil
86
103
  end
87
104
 
88
105
  if attributes.key?(:'refund')
@@ -95,18 +112,38 @@ module Tremendous
95
112
  def list_invalid_properties
96
113
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
114
  invalid_properties = Array.new
98
- if !@subtotal.nil? && @subtotal < 0
115
+ if @subtotal.nil?
116
+ invalid_properties.push('invalid value for "subtotal", subtotal cannot be nil.')
117
+ end
118
+
119
+ if @subtotal < 0
99
120
  invalid_properties.push('invalid value for "subtotal", must be greater than or equal to 0.')
100
121
  end
101
122
 
102
- if !@total.nil? && @total < 0
123
+ if @total.nil?
124
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
125
+ end
126
+
127
+ if @total < 0
103
128
  invalid_properties.push('invalid value for "total", must be greater than or equal to 0.')
104
129
  end
105
130
 
106
- if !@fees.nil? && @fees < 0
131
+ if @fees.nil?
132
+ invalid_properties.push('invalid value for "fees", fees cannot be nil.')
133
+ end
134
+
135
+ if @fees < 0
107
136
  invalid_properties.push('invalid value for "fees", must be greater than or equal to 0.')
108
137
  end
109
138
 
139
+ if @discount.nil?
140
+ invalid_properties.push('invalid value for "discount", discount cannot be nil.')
141
+ end
142
+
143
+ if @discount < 0
144
+ invalid_properties.push('invalid value for "discount", must be greater than or equal to 0.')
145
+ end
146
+
110
147
  invalid_properties
111
148
  end
112
149
 
@@ -114,9 +151,14 @@ module Tremendous
114
151
  # @return true if the model is valid
115
152
  def valid?
116
153
  warn '[DEPRECATED] the `valid?` method is obsolete'
117
- return false if !@subtotal.nil? && @subtotal < 0
118
- return false if !@total.nil? && @total < 0
119
- return false if !@fees.nil? && @fees < 0
154
+ return false if @subtotal.nil?
155
+ return false if @subtotal < 0
156
+ return false if @total.nil?
157
+ return false if @total < 0
158
+ return false if @fees.nil?
159
+ return false if @fees < 0
160
+ return false if @discount.nil?
161
+ return false if @discount < 0
120
162
  true
121
163
  end
122
164
 
@@ -162,6 +204,20 @@ module Tremendous
162
204
  @fees = fees
163
205
  end
164
206
 
207
+ # Custom attribute writer method with validation
208
+ # @param [Object] discount Value to be assigned
209
+ def discount=(discount)
210
+ if discount.nil?
211
+ fail ArgumentError, 'discount cannot be nil'
212
+ end
213
+
214
+ if discount < 0
215
+ fail ArgumentError, 'invalid value for "discount", must be greater than or equal to 0.'
216
+ end
217
+
218
+ @discount = discount
219
+ end
220
+
165
221
  # Checks equality by comparing each attribute.
166
222
  # @param [Object] Object to be compared
167
223
  def ==(o)
@@ -170,6 +226,7 @@ module Tremendous
170
226
  subtotal == o.subtotal &&
171
227
  total == o.total &&
172
228
  fees == o.fees &&
229
+ discount == o.discount &&
173
230
  refund == o.refund
174
231
  end
175
232
 
@@ -182,7 +239,7 @@ module Tremendous
182
239
  # Calculates hash code according to all attributes.
183
240
  # @return [Integer] Hash code
184
241
  def hash
185
- [subtotal, total, fees, refund].hash
242
+ [subtotal, total, fees, discount, refund].hash
186
243
  end
187
244
 
188
245
  # 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