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
@@ -19,6 +19,8 @@ module Tremendous
19
19
  # How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
20
20
  attr_accessor :method
21
21
 
22
+ attr_accessor :meta
23
+
22
24
  class EnumAttributeValidator
23
25
  attr_reader :datatype
24
26
  attr_reader :allowable_values
@@ -44,7 +46,8 @@ module Tremendous
44
46
  # Attribute mapping from ruby-style variable name to JSON key.
45
47
  def self.attribute_map
46
48
  {
47
- :'method' => :'method'
49
+ :'method' => :'method',
50
+ :'meta' => :'meta'
48
51
  }
49
52
  end
50
53
 
@@ -56,7 +59,8 @@ module Tremendous
56
59
  # Attribute type mapping.
57
60
  def self.openapi_types
58
61
  {
59
- :'method' => :'String'
62
+ :'method' => :'String',
63
+ :'meta' => :'SingleRewardOrderRewardDeliveryMeta'
60
64
  }
61
65
  end
62
66
 
@@ -84,6 +88,10 @@ module Tremendous
84
88
  if attributes.key?(:'method')
85
89
  self.method = attributes[:'method']
86
90
  end
91
+
92
+ if attributes.key?(:'meta')
93
+ self.meta = attributes[:'meta']
94
+ end
87
95
  end
88
96
 
89
97
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -118,7 +126,8 @@ module Tremendous
118
126
  def ==(o)
119
127
  return true if self.equal?(o)
120
128
  self.class == o.class &&
121
- method == o.method
129
+ method == o.method &&
130
+ meta == o.meta
122
131
  end
123
132
 
124
133
  # @see the `==` method
@@ -130,7 +139,7 @@ module Tremendous
130
139
  # Calculates hash code according to all attributes.
131
140
  # @return [Integer] Hash code
132
141
  def hash
133
- [method].hash
142
+ [method, meta].hash
134
143
  end
135
144
 
136
145
  # Builds the object from hash
@@ -0,0 +1,236 @@
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
+ # Customizable reward delivery metadata, taking precedence over the related campaign settings.
18
+ class SingleRewardOrderRewardDeliveryMeta
19
+ # The \"sender name\" used in the delivery. If it's an email reward, \"via Tremendous\" will be appended to the value. Please note that you cannot customize the sender email.
20
+ attr_accessor :sender_name
21
+
22
+ # The subject line used in the delivery.
23
+ attr_accessor :subject_line
24
+
25
+ # The content of the message of the reward, shown in the email / SMS and on the landing page.
26
+ attr_accessor :message
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'sender_name' => :'sender_name',
32
+ :'subject_line' => :'subject_line',
33
+ :'message' => :'message'
34
+ }
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'sender_name' => :'String',
46
+ :'subject_line' => :'String',
47
+ :'message' => :'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::SingleRewardOrderRewardDeliveryMeta` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Tremendous::SingleRewardOrderRewardDeliveryMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'sender_name')
73
+ self.sender_name = attributes[:'sender_name']
74
+ end
75
+
76
+ if attributes.key?(:'subject_line')
77
+ self.subject_line = attributes[:'subject_line']
78
+ end
79
+
80
+ if attributes.key?(:'message')
81
+ self.message = attributes[:'message']
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ warn '[DEPRECATED] the `valid?` method is obsolete'
97
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ sender_name == o.sender_name &&
106
+ subject_line == o.subject_line &&
107
+ message == o.message
108
+ end
109
+
110
+ # @see the `==` method
111
+ # @param [Object] Object to be compared
112
+ def eql?(o)
113
+ self == o
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ def hash
119
+ [sender_name, subject_line, message].hash
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def self.build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ attributes = attributes.transform_keys(&:to_sym)
128
+ transformed_hash = {}
129
+ openapi_types.each_pair do |key, type|
130
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
131
+ transformed_hash["#{key}"] = nil
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[attribute_map[key]].is_a?(Array)
136
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
137
+ end
138
+ elsif !attributes[attribute_map[key]].nil?
139
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
140
+ end
141
+ end
142
+ new(transformed_hash)
143
+ end
144
+
145
+ # Deserializes the data based on type
146
+ # @param string type Data type
147
+ # @param string value Value to be deserialized
148
+ # @return [Object] Deserialized data
149
+ def self._deserialize(type, value)
150
+ case type.to_sym
151
+ when :Time
152
+ Time.parse(value)
153
+ when :Date
154
+ Date.parse(value)
155
+ when :String
156
+ value.to_s
157
+ when :Integer
158
+ value.to_i
159
+ when :Float
160
+ value.to_f
161
+ when :Boolean
162
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
163
+ true
164
+ else
165
+ false
166
+ end
167
+ when :Object
168
+ # generic object (usually a Hash), return directly
169
+ value
170
+ when /\AArray<(?<inner_type>.+)>\z/
171
+ inner_type = Regexp.last_match[:inner_type]
172
+ value.map { |v| _deserialize(inner_type, v) }
173
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
174
+ k_type = Regexp.last_match[:k_type]
175
+ v_type = Regexp.last_match[:v_type]
176
+ {}.tap do |hash|
177
+ value.each do |k, v|
178
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
179
+ end
180
+ end
181
+ else # model
182
+ # models (e.g. Pet) or oneOf
183
+ klass = Tremendous.const_get(type)
184
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
185
+ end
186
+ end
187
+
188
+ # Returns the string representation of the object
189
+ # @return [String] String presentation of the object
190
+ def to_s
191
+ to_hash.to_s
192
+ end
193
+
194
+ # to_body is an alias to to_hash (backward compatibility)
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_body
197
+ to_hash
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ # Outputs non-array value in the form of hash
217
+ # For object, use to_hash. Otherwise, just return the value
218
+ # @param [Object] value Any valid value
219
+ # @return [Hash] Returns the value in the form of hash
220
+ def _to_hash(value)
221
+ if value.is_a?(Array)
222
+ value.compact.map { |v| _to_hash(v) }
223
+ elsif value.is_a?(Hash)
224
+ {}.tap do |hash|
225
+ value.each { |k, v| hash[k] = _to_hash(v) }
226
+ end
227
+ elsif value.respond_to? :to_hash
228
+ value.to_hash
229
+ else
230
+ value
231
+ end
232
+ end
233
+
234
+ end
235
+
236
+ end
@@ -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,3 +1,3 @@
1
1
  module Tremendous
2
- VERSION = "5.7.0"
2
+ VERSION = "5.9.0"
3
3
  end
data/lib/tremendous.rb CHANGED
@@ -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,6 +22,8 @@ require 'tremendous/models/allow_email1'
22
22
  require 'tremendous/models/allow_ip'
23
23
  require 'tremendous/models/allow_ip1'
24
24
  require 'tremendous/models/balance_transaction'
25
+ require 'tremendous/models/balance_transaction_order'
26
+ require 'tremendous/models/balance_transaction_order_payment'
25
27
  require 'tremendous/models/base_order_for_create'
26
28
  require 'tremendous/models/campaign'
27
29
  require 'tremendous/models/campaign_base'
@@ -38,7 +40,6 @@ require 'tremendous/models/create_order200_response'
38
40
  require 'tremendous/models/create_order200_response_order'
39
41
  require 'tremendous/models/create_order200_response_order_rewards_inner'
40
42
  require 'tremendous/models/create_order200_response_order_rewards_inner_delivery'
41
- require 'tremendous/models/create_order201_response'
42
43
  require 'tremendous/models/create_order_request'
43
44
  require 'tremendous/models/create_organization'
44
45
  require 'tremendous/models/create_organization200_response'
@@ -61,6 +62,7 @@ require 'tremendous/models/custom_field'
61
62
  require 'tremendous/models/delete_fraud_rule200_response'
62
63
  require 'tremendous/models/delivery_details'
63
64
  require 'tremendous/models/delivery_details_with_link'
65
+ require 'tremendous/models/delivery_metadata'
64
66
  require 'tremendous/models/delivery_method'
65
67
  require 'tremendous/models/delivery_status'
66
68
  require 'tremendous/models/error_model'
@@ -79,6 +81,7 @@ require 'tremendous/models/fraud_review_list_item'
79
81
  require 'tremendous/models/fraud_review_reason'
80
82
  require 'tremendous/models/fraud_review_redemption_method'
81
83
  require 'tremendous/models/fraud_review_related_rewards'
84
+ require 'tremendous/models/fraud_review_risk'
82
85
  require 'tremendous/models/fraud_review_status'
83
86
  require 'tremendous/models/fraud_rule200_response'
84
87
  require 'tremendous/models/fraud_rule400_response'
@@ -101,12 +104,15 @@ require 'tremendous/models/get_funding_source200_response'
101
104
  require 'tremendous/models/get_member200_response'
102
105
  require 'tremendous/models/get_member200_response_member'
103
106
  require 'tremendous/models/get_member200_response_member_events_inner'
107
+ require 'tremendous/models/get_order200_response'
104
108
  require 'tremendous/models/get_organization200_response'
105
109
  require 'tremendous/models/get_product_response'
106
110
  require 'tremendous/models/get_reward200_response'
107
111
  require 'tremendous/models/invoice'
108
112
  require 'tremendous/models/list_balance_transactions200_response'
109
113
  require 'tremendous/models/list_balance_transactions200_response_transactions_inner'
114
+ require 'tremendous/models/list_balance_transactions200_response_transactions_inner_order'
115
+ require 'tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment'
110
116
  require 'tremendous/models/list_campaigns200_response'
111
117
  require 'tremendous/models/list_campaigns200_response_campaigns_inner'
112
118
  require 'tremendous/models/list_campaigns200_response_campaigns_inner_email_style'
@@ -199,6 +205,7 @@ require 'tremendous/models/single_reward_order_payment'
199
205
  require 'tremendous/models/single_reward_order_reward'
200
206
  require 'tremendous/models/single_reward_order_reward_custom_fields_inner'
201
207
  require 'tremendous/models/single_reward_order_reward_delivery'
208
+ require 'tremendous/models/single_reward_order_reward_delivery_meta'
202
209
  require 'tremendous/models/single_reward_order_with_link'
203
210
  require 'tremendous/models/single_reward_order_with_link_order'
204
211
  require 'tremendous/models/single_reward_order_without_link'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tremendous_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.7.0
4
+ version: 5.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tremendous Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-04 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -61,6 +61,8 @@ files:
61
61
  - lib/tremendous/models/allow_ip.rb
62
62
  - lib/tremendous/models/allow_ip1.rb
63
63
  - lib/tremendous/models/balance_transaction.rb
64
+ - lib/tremendous/models/balance_transaction_order.rb
65
+ - lib/tremendous/models/balance_transaction_order_payment.rb
64
66
  - lib/tremendous/models/base_order_for_create.rb
65
67
  - lib/tremendous/models/campaign.rb
66
68
  - lib/tremendous/models/campaign_base.rb
@@ -100,6 +102,7 @@ files:
100
102
  - lib/tremendous/models/delete_fraud_rule200_response.rb
101
103
  - lib/tremendous/models/delivery_details.rb
102
104
  - lib/tremendous/models/delivery_details_with_link.rb
105
+ - lib/tremendous/models/delivery_metadata.rb
103
106
  - lib/tremendous/models/delivery_method.rb
104
107
  - lib/tremendous/models/delivery_status.rb
105
108
  - lib/tremendous/models/error_model.rb
@@ -118,6 +121,7 @@ files:
118
121
  - lib/tremendous/models/fraud_review_reason.rb
119
122
  - lib/tremendous/models/fraud_review_redemption_method.rb
120
123
  - lib/tremendous/models/fraud_review_related_rewards.rb
124
+ - lib/tremendous/models/fraud_review_risk.rb
121
125
  - lib/tremendous/models/fraud_review_status.rb
122
126
  - lib/tremendous/models/fraud_rule200_response.rb
123
127
  - lib/tremendous/models/fraud_rule400_response.rb
@@ -140,12 +144,15 @@ files:
140
144
  - lib/tremendous/models/get_member200_response.rb
141
145
  - lib/tremendous/models/get_member200_response_member.rb
142
146
  - lib/tremendous/models/get_member200_response_member_events_inner.rb
147
+ - lib/tremendous/models/get_order200_response.rb
143
148
  - lib/tremendous/models/get_organization200_response.rb
144
149
  - lib/tremendous/models/get_product_response.rb
145
150
  - lib/tremendous/models/get_reward200_response.rb
146
151
  - lib/tremendous/models/invoice.rb
147
152
  - lib/tremendous/models/list_balance_transactions200_response.rb
148
153
  - lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb
154
+ - lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order.rb
155
+ - lib/tremendous/models/list_balance_transactions200_response_transactions_inner_order_payment.rb
149
156
  - lib/tremendous/models/list_campaigns200_response.rb
150
157
  - lib/tremendous/models/list_campaigns200_response_campaigns_inner.rb
151
158
  - lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb
@@ -238,6 +245,7 @@ files:
238
245
  - lib/tremendous/models/single_reward_order_reward.rb
239
246
  - lib/tremendous/models/single_reward_order_reward_custom_fields_inner.rb
240
247
  - lib/tremendous/models/single_reward_order_reward_delivery.rb
248
+ - lib/tremendous/models/single_reward_order_reward_delivery_meta.rb
241
249
  - lib/tremendous/models/single_reward_order_with_link.rb
242
250
  - lib/tremendous/models/single_reward_order_with_link_order.rb
243
251
  - lib/tremendous/models/single_reward_order_without_link.rb
@@ -271,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
271
279
  - !ruby/object:Gem::Version
272
280
  version: '0'
273
281
  requirements: []
274
- rubygems_version: 3.5.16
282
+ rubygems_version: 3.5.22
275
283
  signing_key:
276
284
  specification_version: 4
277
285
  summary: Tremendous Ruby API SDK