tremendous_ruby 5.30.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tremendous/api/tremendous_api.rb +4 -4
- data/lib/tremendous/models/balance_transaction.rb +11 -1
- data/lib/tremendous/models/create_invoice_request.rb +2 -2
- data/lib/tremendous/models/create_order200_response_order_rewards_inner.rb +1 -1
- data/lib/tremendous/models/currency_codes.rb +1 -2
- data/lib/tremendous/models/fraud_review.rb +2 -2
- data/lib/tremendous/models/fraud_review_base.rb +2 -2
- data/lib/tremendous/models/fraud_review_list_item.rb +2 -2
- data/lib/tremendous/models/fraud_review_reason.rb +6 -1
- data/lib/tremendous/models/fraud_review_redemption_method.rb +5 -1
- data/lib/tremendous/models/get_fraud_review200_response_fraud_review.rb +2 -2
- data/lib/tremendous/models/invoice.rb +2 -2
- data/lib/tremendous/models/invoice_response_invoice.rb +2 -2
- data/lib/tremendous/models/list_balance_transactions200_response_transactions_inner.rb +11 -1
- data/lib/tremendous/models/list_fraud_reviews200_response_fraud_reviews_inner.rb +2 -2
- data/lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta_failure_details.rb +2 -0
- data/lib/tremendous/models/list_invoices200_response_invoices_inner.rb +2 -2
- data/lib/tremendous/models/list_products_response_products_inner.rb +1 -1
- data/lib/tremendous/models/list_products_response_products_inner_skus_inner.rb +1 -1
- data/lib/tremendous/models/list_rewards200_response_rewards_inner.rb +1 -1
- data/lib/tremendous/models/list_rewards200_response_rewards_inner_value.rb +1 -1
- data/lib/tremendous/models/order_with_link_rewards_inner.rb +1 -1
- data/lib/tremendous/models/product.rb +1 -1
- data/lib/tremendous/models/reward.rb +1 -1
- data/lib/tremendous/models/reward_base.rb +1 -1
- data/lib/tremendous/models/reward_for_order_create.rb +1 -1
- data/lib/tremendous/models/reward_response_reward.rb +1 -1
- data/lib/tremendous/models/reward_value.rb +1 -1
- data/lib/tremendous/models/reward_with_link.rb +1 -1
- data/lib/tremendous/models/reward_without_link.rb +1 -1
- data/lib/tremendous/models/single_reward_order_reward.rb +1 -1
- data/lib/tremendous/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad9c7212931ca6daaa40284cd042f5a6574bdc1e37549750f3342360965b5ffb
|
|
4
|
+
data.tar.gz: 9ebb5abf95dcb9ec7bdd2653df1403b0e609dc4d81f77dd7340f1b865719b405
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6282c1169e5cdedf4c0bdcb64faed589bbbbc5bf415bf0aec6edd8830a9a39d5d910a773780827b15dc942ef95d45625fe57fc6f9353ca6d60e079a75dd7444
|
|
7
|
+
data.tar.gz: c38b465486a1c9cd6b19e9b096ed2f9cddbd2e4ebce277fb7522d3dc07dc8d87f72755bafc9bc309003060bae648d63659d870f4ade2eadb52a4fba2f87d42e3
|
|
@@ -763,7 +763,7 @@ module Tremendous
|
|
|
763
763
|
end
|
|
764
764
|
|
|
765
765
|
# Create order
|
|
766
|
-
# Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order.</p> <p>You can also pass one of the following magic values (case-insensitive):</p> <ul> <li><code>BALANCE</code> — pay from your Tremendous balance.</li> <li><code>INVOICE</code> — pay from your commercial invoice account.</li> <li><code>INVOICE_THEN_BALANCE</code> — pay from your commercial invoice account if doing so wouldn't exceed your credit limit, otherwise fall back to your Tremendous balance. The balance must have sufficient funds to pay for the order.</li> </ul> <p><strong>Note:</strong> <code>INVOICE</code> and <code>INVOICE_THEN_BALANCE</code> are only available to select Enterprise clients with an existing commercial invoicing setup. If your organization already uses commercial invoicing and you have questions, contact your Customer Success Manager.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">expires_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Expiration date of the reward. If null, the reward does not expire.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward. Defaults to the organization's currency if not provided.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">meta</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Customizable reward delivery metadata, taking precedence over the related campaign settings.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">sender_name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>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.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">subject_line</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The subject line used in the delivery.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">message</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The content of the message of the reward, shown in the email / SMS and on the landing page.</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://developers.tremendous.com/reference/list-funding-sources). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $100,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://developers.tremendous.com/docs/sandbox-environment). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it's recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same `external_id` are idempotent. Submitting an order with an already existing `external_id` will not create a new order. If the payload is the same as a previously issued order, our API will return a `201` response code, along with a representation of the already-existing order in the response body. If the `external_id` used is for an order with different parameters (e.g. amount, recipient), our API will return a `409` response code, indicating a conflicting resource.
|
|
766
|
+
# Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order.</p> <p>You can also pass one of the following magic values (case-insensitive):</p> <ul> <li><code>BALANCE</code> — pay from your Tremendous balance.</li> <li><code>INVOICE</code> — pay from your commercial invoice account.</li> <li><code>INVOICE_THEN_BALANCE</code> — pay from your commercial invoice account if doing so wouldn't exceed your credit limit, otherwise fall back to your Tremendous balance. The balance must have sufficient funds to pay for the order.</li> </ul> <p><strong>Note:</strong> <code>INVOICE</code> and <code>INVOICE_THEN_BALANCE</code> are only available to select Enterprise clients with an existing commercial invoicing setup. If your organization already uses commercial invoicing and you have questions, contact your Customer Success Manager.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">expires_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Expiration date of the reward. If null, the reward does not expire.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward. Defaults to the organization's currency if not provided.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">meta</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Customizable reward delivery metadata, taking precedence over the related campaign settings.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">sender_name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>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.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">subject_line</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The subject line used in the delivery.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">message</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The content of the message of the reward, shown in the email / SMS and on the landing page.</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://developers.tremendous.com/reference/list-funding-sources). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $100,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://developers.tremendous.com/docs/sandbox-environment). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it's recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same `external_id` are idempotent. Submitting an order with the `external_id` of a submitted order will not create a new order, including while its card payment is still processing. If the payload is the same as a previously issued order, our API will return a `201` response code, along with a representation of the already-existing order in the response body. If the `external_id` used is for an order with different parameters (e.g. amount, recipient), our API will return a `409` response code, indicating a conflicting resource. ### Pending card payments If the card processor's outcome is still unknown, the order remains `OPEN` and rewards remain unsent while the payment is reconciled. Repeating an equivalent request with the same `external_id` returns `201` with the existing order; a conflicting request returns `409`. An unknown outcome does not permit a new charge.
|
|
767
767
|
# @param create_order_request [CreateOrderRequest] Order to create
|
|
768
768
|
# @param [Hash] opts the optional parameters
|
|
769
769
|
# @return [CreateOrder200Response]
|
|
@@ -773,7 +773,7 @@ module Tremendous
|
|
|
773
773
|
end
|
|
774
774
|
|
|
775
775
|
# Create order
|
|
776
|
-
# Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order.</p> <p>You can also pass one of the following magic values (case-insensitive):</p> <ul> <li><code>BALANCE</code> — pay from your Tremendous balance.</li> <li><code>INVOICE</code> — pay from your commercial invoice account.</li> <li><code>INVOICE_THEN_BALANCE</code> — pay from your commercial invoice account if doing so wouldn&#39;t exceed your credit limit, otherwise fall back to your Tremendous balance. The balance must have sufficient funds to pay for the order.</li> </ul> <p><strong>Note:</strong> <code>INVOICE</code> and <code>INVOICE_THEN_BALANCE</code> are only available to select Enterprise clients with an existing commercial invoicing setup. If your organization already uses commercial invoicing and you have questions, contact your Customer Success Manager.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">expires_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Expiration date of the reward. If null, the reward does not expire.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward. Defaults to the organization&#39;s currency if not provided.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">meta</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Customizable reward delivery metadata, taking precedence over the related campaign settings.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">sender_name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The &quot;sender name&quot; used in the delivery. If it&#39;s an email reward, &quot;via Tremendous&quot; will be appended to the value. Please note that you cannot customize the sender email.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">subject_line</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The subject line used in the delivery.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">message</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The content of the message of the reward, shown in the email / SMS and on the landing page.</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://developers.tremendous.com/reference/list-funding-sources). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $100,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://developers.tremendous.com/docs/sandbox-environment). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it's recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same `external_id` are idempotent. Submitting an order with an already existing `external_id` will not create a new order. If the payload is the same as a previously issued order, our API will return a `201` response code, along with a representation of the already-existing order in the response body. If the `external_id` used is for an order with different parameters (e.g. amount, recipient), our API will return a `409` response code, indicating a conflicting resource.
|
|
776
|
+
# Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order.</p> <p>You can also pass one of the following magic values (case-insensitive):</p> <ul> <li><code>BALANCE</code> — pay from your Tremendous balance.</li> <li><code>INVOICE</code> — pay from your commercial invoice account.</li> <li><code>INVOICE_THEN_BALANCE</code> — pay from your commercial invoice account if doing so wouldn&#39;t exceed your credit limit, otherwise fall back to your Tremendous balance. The balance must have sufficient funds to pay for the order.</li> </ul> <p><strong>Note:</strong> <code>INVOICE</code> and <code>INVOICE_THEN_BALANCE</code> are only available to select Enterprise clients with an existing commercial invoicing setup. If your organization already uses commercial invoicing and you have questions, contact your Customer Success Manager.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">expires_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Expiration date of the reward. If null, the reward does not expire.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward. Defaults to the organization&#39;s currency if not provided.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization&#39;s time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <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 initial <code>POST /orders</code> response for a link reward includes the link in <code>delivery.link</code>.</p> <p>The link must then be delivered to the recipient out-of-band.</p> <p>To obtain a new link for an existing reward, call <code>POST /rewards/{id}/generate_link</code>.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">meta</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Customizable reward delivery metadata, taking precedence over the related campaign settings.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">sender_name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The &quot;sender name&quot; used in the delivery. If it&#39;s an email reward, &quot;via Tremendous&quot; will be appended to the value. Please note that you cannot customize the sender email.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">subject_line</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The subject line used in the delivery.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">message</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The content of the message of the reward, shown in the email / SMS and on the landing page.</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://developers.tremendous.com/reference/list-funding-sources). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $100,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://developers.tremendous.com/docs/sandbox-environment). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it's recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same `external_id` are idempotent. Submitting an order with the `external_id` of a submitted order will not create a new order, including while its card payment is still processing. If the payload is the same as a previously issued order, our API will return a `201` response code, along with a representation of the already-existing order in the response body. If the `external_id` used is for an order with different parameters (e.g. amount, recipient), our API will return a `409` response code, indicating a conflicting resource. ### Pending card payments If the card processor's outcome is still unknown, the order remains `OPEN` and rewards remain unsent while the payment is reconciled. Repeating an equivalent request with the same `external_id` returns `201` with the existing order; a conflicting request returns `409`. An unknown outcome does not permit a new charge.
|
|
777
777
|
# @param create_order_request [CreateOrderRequest] Order to create
|
|
778
778
|
# @param [Hash] opts the optional parameters
|
|
779
779
|
# @return [Array<(CreateOrder200Response, Integer, Hash)>] CreateOrder200Response data, response status code and response headers
|
|
@@ -2214,7 +2214,7 @@ module Tremendous
|
|
|
2214
2214
|
|
|
2215
2215
|
# Retrieve order
|
|
2216
2216
|
# Retrieve the order, identified by the given `id` in the URL
|
|
2217
|
-
# @param id [String] ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it's possible to use it instead.
|
|
2217
|
+
# @param id [String] ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it's possible to use it instead. When several attempts share an external ID, the submitted order takes precedence; otherwise, the most recent attempt is returned. Use an order's own ID to retrieve a specific failed or canceled attempt.
|
|
2218
2218
|
# @param [Hash] opts the optional parameters
|
|
2219
2219
|
# @return [GetOrder200Response]
|
|
2220
2220
|
def get_order(id, opts = {})
|
|
@@ -2224,7 +2224,7 @@ module Tremendous
|
|
|
2224
2224
|
|
|
2225
2225
|
# Retrieve order
|
|
2226
2226
|
# Retrieve the order, identified by the given `id` in the URL
|
|
2227
|
-
# @param id [String] ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it's possible to use it instead.
|
|
2227
|
+
# @param id [String] ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it's possible to use it instead. When several attempts share an external ID, the submitted order takes precedence; otherwise, the most recent attempt is returned. Use an order's own ID to retrieve a specific failed or canceled attempt.
|
|
2228
2228
|
# @param [Hash] opts the optional parameters
|
|
2229
2229
|
# @return [Array<(GetOrder200Response, Integer, Hash)>] GetOrder200Response data, response status code and response headers
|
|
2230
2230
|
def get_order_with_http_info(id, opts = {})
|
|
@@ -34,6 +34,9 @@ module Tremendous
|
|
|
34
34
|
# A brief description of the transaction
|
|
35
35
|
attr_accessor :description
|
|
36
36
|
|
|
37
|
+
# ID of the payment behind the transaction, shown as \"Payment ID\" in the dashboard's balance transactions export and as \"Prefund confirmation\" on deposit receipts. Use it to match deposits, including auto-reloads, against your bank or card statements. Only present on transactions tied to a payment into your balance, such as deposits, the credit recorded when an order is paid by card or bank transfer, and transfers between organizations. Omitted otherwise, for example on the debit for an order paid from your balance.
|
|
38
|
+
attr_accessor :payment_id
|
|
39
|
+
|
|
37
40
|
attr_accessor :order
|
|
38
41
|
|
|
39
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -45,6 +48,7 @@ module Tremendous
|
|
|
45
48
|
:'balance' => :'balance',
|
|
46
49
|
:'action' => :'action',
|
|
47
50
|
:'description' => :'description',
|
|
51
|
+
:'payment_id' => :'payment_id',
|
|
48
52
|
:'order' => :'order'
|
|
49
53
|
}
|
|
50
54
|
end
|
|
@@ -68,6 +72,7 @@ module Tremendous
|
|
|
68
72
|
:'balance' => :'Float',
|
|
69
73
|
:'action' => :'String',
|
|
70
74
|
:'description' => :'String',
|
|
75
|
+
:'payment_id' => :'String',
|
|
71
76
|
:'order' => :'BalanceTransactionOrder'
|
|
72
77
|
}
|
|
73
78
|
end
|
|
@@ -130,6 +135,10 @@ module Tremendous
|
|
|
130
135
|
self.description = nil
|
|
131
136
|
end
|
|
132
137
|
|
|
138
|
+
if attributes.key?(:'payment_id')
|
|
139
|
+
self.payment_id = attributes[:'payment_id']
|
|
140
|
+
end
|
|
141
|
+
|
|
133
142
|
if attributes.key?(:'order')
|
|
134
143
|
self.order = attributes[:'order']
|
|
135
144
|
end
|
|
@@ -251,6 +260,7 @@ module Tremendous
|
|
|
251
260
|
balance == o.balance &&
|
|
252
261
|
action == o.action &&
|
|
253
262
|
description == o.description &&
|
|
263
|
+
payment_id == o.payment_id &&
|
|
254
264
|
order == o.order
|
|
255
265
|
end
|
|
256
266
|
|
|
@@ -263,7 +273,7 @@ module Tremendous
|
|
|
263
273
|
# Calculates hash code according to all attributes.
|
|
264
274
|
# @return [Integer] Hash code
|
|
265
275
|
def hash
|
|
266
|
-
[created_at, amount, currency_code, balance, action, description, order].hash
|
|
276
|
+
[created_at, amount, currency_code, balance, action, description, payment_id, order].hash
|
|
267
277
|
end
|
|
268
278
|
|
|
269
279
|
# Builds the object from hash
|
|
@@ -148,9 +148,9 @@ module Tremendous
|
|
|
148
148
|
def valid?
|
|
149
149
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
150
150
|
return false if @amount.nil?
|
|
151
|
-
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD"])
|
|
151
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD", "ILS", "AUD", "SGD", "HKD", "NZD", "MXN"])
|
|
152
152
|
return false unless currency_code_validator.valid?(@currency_code)
|
|
153
|
-
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD"])
|
|
153
|
+
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD", "ILS", "AUD", "SGD", "HKD", "NZD", "MXN"])
|
|
154
154
|
return false unless currency_validator.valid?(@currency)
|
|
155
155
|
true
|
|
156
156
|
end
|
|
@@ -32,7 +32,7 @@ module Tremendous
|
|
|
32
32
|
|
|
33
33
|
attr_accessor :recipient
|
|
34
34
|
|
|
35
|
-
#
|
|
35
|
+
# Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.
|
|
36
36
|
attr_accessor :deliver_at
|
|
37
37
|
|
|
38
38
|
attr_accessor :custom_fields
|
|
@@ -57,7 +57,6 @@ module Tremendous
|
|
|
57
57
|
GTQ = "GTQ".freeze
|
|
58
58
|
HKD = "HKD".freeze
|
|
59
59
|
HNL = "HNL".freeze
|
|
60
|
-
HRK = "HRK".freeze
|
|
61
60
|
HUF = "HUF".freeze
|
|
62
61
|
IDR = "IDR".freeze
|
|
63
62
|
ILS = "ILS".freeze
|
|
@@ -128,7 +127,7 @@ module Tremendous
|
|
|
128
127
|
ZAR = "ZAR".freeze
|
|
129
128
|
|
|
130
129
|
def self.all_vars
|
|
131
|
-
@all_vars ||= [USD, CAD, EUR, AED, AFN, ALL, AMD, ARS, AUD, AZN, BAM, BDT, BHD, BIF, BND, BOB, BRL, BWP, BYN, BZD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, GBP, GEL, GHS, GNF, GTQ, HKD, HNL,
|
|
130
|
+
@all_vars ||= [USD, CAD, EUR, AED, AFN, ALL, AMD, ARS, AUD, AZN, BAM, BDT, BHD, BIF, BND, BOB, BRL, BWP, BYN, BZD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, GBP, GEL, GHS, GNF, GTQ, HKD, HNL, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KHR, KRW, KWD, KZT, LBP, LKR, MAD, MDL, MGA, MKD, MMK, MOP, MUR, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SDG, SEK, SGD, SOS, SYP, THB, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, UYU, UZS, VEF, VND, XAF, XOF, YER, ZAR].freeze
|
|
132
131
|
end
|
|
133
132
|
|
|
134
133
|
# Builds the enum from string
|
|
@@ -19,7 +19,7 @@ module Tremendous
|
|
|
19
19
|
# The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released.
|
|
20
20
|
attr_accessor :status
|
|
21
21
|
|
|
22
|
-
# The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward amount limit` * `Over reward count limit` * `VPN detected` * `Apple Private Relay` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `Device on a Tremendous fraud list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` * `Allowed country`
|
|
22
|
+
# The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward amount limit` * `Over reward count limit` * `VPN detected` * `Apple Private Relay` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `Device on a Tremendous fraud list` * `IP on a Tremendous allow list` * `Bank account on a Tremendous allow list` * `Email on a Tremendous allow list` * `Phone on a Tremendous allow list` * `Device on a Tremendous allow list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` * `Allowed country`
|
|
23
23
|
attr_accessor :reasons
|
|
24
24
|
|
|
25
25
|
# The device fingerprint, if known.
|
|
@@ -204,7 +204,7 @@ module Tremendous
|
|
|
204
204
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
205
205
|
status_validator = EnumAttributeValidator.new('String', ["flagged", "blocked", "released"])
|
|
206
206
|
return false unless status_validator.valid?(@status)
|
|
207
|
-
redemption_method_validator = EnumAttributeValidator.new('String', ["bank transfer", "charity", "instant debit transfer", "international bank transfer", "merchant card", "paypal", "venmo", "visa card"])
|
|
207
|
+
redemption_method_validator = EnumAttributeValidator.new('String', ["bank transfer", "cash app", "charity", "crypto", "instant debit transfer", "international bank transfer", "merchant card", "paypal", "recipient_promotion", "venmo", "visa card", "zelle"])
|
|
208
208
|
return false unless redemption_method_validator.valid?(@redemption_method)
|
|
209
209
|
risk_validator = EnumAttributeValidator.new('String', ["high", "medium", "low"])
|
|
210
210
|
return false unless risk_validator.valid?(@risk)
|
|
@@ -19,7 +19,7 @@ module Tremendous
|
|
|
19
19
|
# The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released.
|
|
20
20
|
attr_accessor :status
|
|
21
21
|
|
|
22
|
-
# The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward amount limit` * `Over reward count limit` * `VPN detected` * `Apple Private Relay` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `Device on a Tremendous fraud list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` * `Allowed country`
|
|
22
|
+
# The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward amount limit` * `Over reward count limit` * `VPN detected` * `Apple Private Relay` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `Device on a Tremendous fraud list` * `IP on a Tremendous allow list` * `Bank account on a Tremendous allow list` * `Email on a Tremendous allow list` * `Phone on a Tremendous allow list` * `Device on a Tremendous allow list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` * `Allowed country`
|
|
23
23
|
attr_accessor :reasons
|
|
24
24
|
|
|
25
25
|
# The device fingerprint, if known.
|
|
@@ -187,7 +187,7 @@ module Tremendous
|
|
|
187
187
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
188
188
|
status_validator = EnumAttributeValidator.new('String', ["flagged", "blocked", "released"])
|
|
189
189
|
return false unless status_validator.valid?(@status)
|
|
190
|
-
redemption_method_validator = EnumAttributeValidator.new('String', ["bank transfer", "charity", "instant debit transfer", "international bank transfer", "merchant card", "paypal", "venmo", "visa card"])
|
|
190
|
+
redemption_method_validator = EnumAttributeValidator.new('String', ["bank transfer", "cash app", "charity", "crypto", "instant debit transfer", "international bank transfer", "merchant card", "paypal", "recipient_promotion", "venmo", "visa card", "zelle"])
|
|
191
191
|
return false unless redemption_method_validator.valid?(@redemption_method)
|
|
192
192
|
true
|
|
193
193
|
end
|
|
@@ -19,7 +19,7 @@ module Tremendous
|
|
|
19
19
|
# The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released.
|
|
20
20
|
attr_accessor :status
|
|
21
21
|
|
|
22
|
-
# The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward amount limit` * `Over reward count limit` * `VPN detected` * `Apple Private Relay` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `Device on a Tremendous fraud list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` * `Allowed country`
|
|
22
|
+
# The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward amount limit` * `Over reward count limit` * `VPN detected` * `Apple Private Relay` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `Device on a Tremendous fraud list` * `IP on a Tremendous allow list` * `Bank account on a Tremendous allow list` * `Email on a Tremendous allow list` * `Phone on a Tremendous allow list` * `Device on a Tremendous allow list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` * `Allowed country`
|
|
23
23
|
attr_accessor :reasons
|
|
24
24
|
|
|
25
25
|
# The device fingerprint, if known.
|
|
@@ -187,7 +187,7 @@ module Tremendous
|
|
|
187
187
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
188
188
|
status_validator = EnumAttributeValidator.new('String', ["flagged", "blocked", "released"])
|
|
189
189
|
return false unless status_validator.valid?(@status)
|
|
190
|
-
redemption_method_validator = EnumAttributeValidator.new('String', ["bank transfer", "charity", "instant debit transfer", "international bank transfer", "merchant card", "paypal", "venmo", "visa card"])
|
|
190
|
+
redemption_method_validator = EnumAttributeValidator.new('String', ["bank transfer", "cash app", "charity", "crypto", "instant debit transfer", "international bank transfer", "merchant card", "paypal", "recipient_promotion", "venmo", "visa card", "zelle"])
|
|
191
191
|
return false unless redemption_method_validator.valid?(@redemption_method)
|
|
192
192
|
true
|
|
193
193
|
end
|
|
@@ -30,6 +30,11 @@ module Tremendous
|
|
|
30
30
|
EMAIL_ON_A_TREMENDOUS_FRAUD_LIST = "Email on a Tremendous fraud list".freeze
|
|
31
31
|
PHONE_ON_A_TREMENDOUS_FRAUD_LIST = "Phone on a Tremendous fraud list".freeze
|
|
32
32
|
DEVICE_ON_A_TREMENDOUS_FRAUD_LIST = "Device on a Tremendous fraud list".freeze
|
|
33
|
+
IP_ON_A_TREMENDOUS_ALLOW_LIST = "IP on a Tremendous allow list".freeze
|
|
34
|
+
BANK_ACCOUNT_ON_A_TREMENDOUS_ALLOW_LIST = "Bank account on a Tremendous allow list".freeze
|
|
35
|
+
EMAIL_ON_A_TREMENDOUS_ALLOW_LIST = "Email on a Tremendous allow list".freeze
|
|
36
|
+
PHONE_ON_A_TREMENDOUS_ALLOW_LIST = "Phone on a Tremendous allow list".freeze
|
|
37
|
+
DEVICE_ON_A_TREMENDOUS_ALLOW_LIST = "Device on a Tremendous allow list".freeze
|
|
33
38
|
IP_RELATED_TO_A_BLOCKED_REWARD = "IP related to a blocked reward".freeze
|
|
34
39
|
DEVICE_RELATED_TO_A_BLOCKED_REWARD = "Device related to a blocked reward".freeze
|
|
35
40
|
BANK_ACCOUNT_RELATED_TO_A_BLOCKED_REWARD = "Bank account related to a blocked reward".freeze
|
|
@@ -41,7 +46,7 @@ module Tremendous
|
|
|
41
46
|
ALLOWED_COUNTRY = "Allowed country".freeze
|
|
42
47
|
|
|
43
48
|
def self.all_vars
|
|
44
|
-
@all_vars ||= [DISALLOWED_IP, DISALLOWED_EMAIL, DISALLOWED_COUNTRY, OVER_REWARD_AMOUNT_LIMIT, OVER_REWARD_COUNT_LIMIT, VPN_DETECTED, APPLE_PRIVATE_RELAY, DEVICE_RELATED_TO_MULTIPLE_EMAILS, DEVICE_OR_ACCOUNT_RELATED_TO_MULTIPLE_EMAILS, IP_ON_A_TREMENDOUS_FRAUD_LIST, BANK_ACCOUNT_ON_A_TREMENDOUS_FRAUD_LIST, FINGERPRINT_ON_A_TREMENDOUS_FRAUD_LIST, EMAIL_ON_A_TREMENDOUS_FRAUD_LIST, PHONE_ON_A_TREMENDOUS_FRAUD_LIST, DEVICE_ON_A_TREMENDOUS_FRAUD_LIST, IP_RELATED_TO_A_BLOCKED_REWARD, DEVICE_RELATED_TO_A_BLOCKED_REWARD, BANK_ACCOUNT_RELATED_TO_A_BLOCKED_REWARD, FINGERPRINT_RELATED_TO_A_BLOCKED_REWARD, EMAIL_RELATED_TO_A_BLOCKED_REWARD, PHONE_RELATED_TO_A_BLOCKED_REWARD, ALLOWED_IP, ALLOWED_EMAIL, ALLOWED_COUNTRY].freeze
|
|
49
|
+
@all_vars ||= [DISALLOWED_IP, DISALLOWED_EMAIL, DISALLOWED_COUNTRY, OVER_REWARD_AMOUNT_LIMIT, OVER_REWARD_COUNT_LIMIT, VPN_DETECTED, APPLE_PRIVATE_RELAY, DEVICE_RELATED_TO_MULTIPLE_EMAILS, DEVICE_OR_ACCOUNT_RELATED_TO_MULTIPLE_EMAILS, IP_ON_A_TREMENDOUS_FRAUD_LIST, BANK_ACCOUNT_ON_A_TREMENDOUS_FRAUD_LIST, FINGERPRINT_ON_A_TREMENDOUS_FRAUD_LIST, EMAIL_ON_A_TREMENDOUS_FRAUD_LIST, PHONE_ON_A_TREMENDOUS_FRAUD_LIST, DEVICE_ON_A_TREMENDOUS_FRAUD_LIST, IP_ON_A_TREMENDOUS_ALLOW_LIST, BANK_ACCOUNT_ON_A_TREMENDOUS_ALLOW_LIST, EMAIL_ON_A_TREMENDOUS_ALLOW_LIST, PHONE_ON_A_TREMENDOUS_ALLOW_LIST, DEVICE_ON_A_TREMENDOUS_ALLOW_LIST, IP_RELATED_TO_A_BLOCKED_REWARD, DEVICE_RELATED_TO_A_BLOCKED_REWARD, BANK_ACCOUNT_RELATED_TO_A_BLOCKED_REWARD, FINGERPRINT_RELATED_TO_A_BLOCKED_REWARD, EMAIL_RELATED_TO_A_BLOCKED_REWARD, PHONE_RELATED_TO_A_BLOCKED_REWARD, ALLOWED_IP, ALLOWED_EMAIL, ALLOWED_COUNTRY].freeze
|
|
45
50
|
end
|
|
46
51
|
|
|
47
52
|
# Builds the enum from string
|
|
@@ -16,16 +16,20 @@ require 'time'
|
|
|
16
16
|
module Tremendous
|
|
17
17
|
class FraudReviewRedemptionMethod
|
|
18
18
|
BANK_TRANSFER = "bank transfer".freeze
|
|
19
|
+
CASH_APP = "cash app".freeze
|
|
19
20
|
CHARITY = "charity".freeze
|
|
21
|
+
CRYPTO = "crypto".freeze
|
|
20
22
|
INSTANT_DEBIT_TRANSFER = "instant debit transfer".freeze
|
|
21
23
|
INTERNATIONAL_BANK_TRANSFER = "international bank transfer".freeze
|
|
22
24
|
MERCHANT_CARD = "merchant card".freeze
|
|
23
25
|
PAYPAL = "paypal".freeze
|
|
26
|
+
RECIPIENT_PROMOTION = "recipient_promotion".freeze
|
|
24
27
|
VENMO = "venmo".freeze
|
|
25
28
|
VISA_CARD = "visa card".freeze
|
|
29
|
+
ZELLE = "zelle".freeze
|
|
26
30
|
|
|
27
31
|
def self.all_vars
|
|
28
|
-
@all_vars ||= [BANK_TRANSFER, CHARITY, INSTANT_DEBIT_TRANSFER, INTERNATIONAL_BANK_TRANSFER, MERCHANT_CARD, PAYPAL, VENMO, VISA_CARD].freeze
|
|
32
|
+
@all_vars ||= [BANK_TRANSFER, CASH_APP, CHARITY, CRYPTO, INSTANT_DEBIT_TRANSFER, INTERNATIONAL_BANK_TRANSFER, MERCHANT_CARD, PAYPAL, RECIPIENT_PROMOTION, VENMO, VISA_CARD, ZELLE].freeze
|
|
29
33
|
end
|
|
30
34
|
|
|
31
35
|
# Builds the enum from string
|
|
@@ -19,7 +19,7 @@ module Tremendous
|
|
|
19
19
|
# The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released.
|
|
20
20
|
attr_accessor :status
|
|
21
21
|
|
|
22
|
-
# The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward amount limit` * `Over reward count limit` * `VPN detected` * `Apple Private Relay` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `Device on a Tremendous fraud list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` * `Allowed country`
|
|
22
|
+
# The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward amount limit` * `Over reward count limit` * `VPN detected` * `Apple Private Relay` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `Device on a Tremendous fraud list` * `IP on a Tremendous allow list` * `Bank account on a Tremendous allow list` * `Email on a Tremendous allow list` * `Phone on a Tremendous allow list` * `Device on a Tremendous allow list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` * `Allowed country`
|
|
23
23
|
attr_accessor :reasons
|
|
24
24
|
|
|
25
25
|
# The device fingerprint, if known.
|
|
@@ -204,7 +204,7 @@ module Tremendous
|
|
|
204
204
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
205
205
|
status_validator = EnumAttributeValidator.new('String', ["flagged", "blocked", "released"])
|
|
206
206
|
return false unless status_validator.valid?(@status)
|
|
207
|
-
redemption_method_validator = EnumAttributeValidator.new('String', ["bank transfer", "charity", "instant debit transfer", "international bank transfer", "merchant card", "paypal", "venmo", "visa card"])
|
|
207
|
+
redemption_method_validator = EnumAttributeValidator.new('String', ["bank transfer", "cash app", "charity", "crypto", "instant debit transfer", "international bank transfer", "merchant card", "paypal", "recipient_promotion", "venmo", "visa card", "zelle"])
|
|
208
208
|
return false unless redemption_method_validator.valid?(@redemption_method)
|
|
209
209
|
risk_validator = EnumAttributeValidator.new('String', ["high", "medium", "low"])
|
|
210
210
|
return false unless risk_validator.valid?(@risk)
|
|
@@ -227,9 +227,9 @@ module Tremendous
|
|
|
227
227
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
228
228
|
return false if @id.nil?
|
|
229
229
|
return false if @amount.nil?
|
|
230
|
-
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD"])
|
|
230
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD", "ILS", "AUD", "SGD", "HKD", "NZD", "MXN"])
|
|
231
231
|
return false unless currency_code_validator.valid?(@currency_code)
|
|
232
|
-
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD"])
|
|
232
|
+
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD", "ILS", "AUD", "SGD", "HKD", "NZD", "MXN"])
|
|
233
233
|
return false unless currency_validator.valid?(@currency)
|
|
234
234
|
return false if @status.nil?
|
|
235
235
|
status_validator = EnumAttributeValidator.new('String', ["DELETED", "PAID", "OPEN", "MARKED_AS_PAID"])
|
|
@@ -227,9 +227,9 @@ module Tremendous
|
|
|
227
227
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
228
228
|
return false if @id.nil?
|
|
229
229
|
return false if @amount.nil?
|
|
230
|
-
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD"])
|
|
230
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD", "ILS", "AUD", "SGD", "HKD", "NZD", "MXN"])
|
|
231
231
|
return false unless currency_code_validator.valid?(@currency_code)
|
|
232
|
-
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD"])
|
|
232
|
+
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD", "ILS", "AUD", "SGD", "HKD", "NZD", "MXN"])
|
|
233
233
|
return false unless currency_validator.valid?(@currency)
|
|
234
234
|
return false if @status.nil?
|
|
235
235
|
status_validator = EnumAttributeValidator.new('String', ["DELETED", "PAID", "OPEN", "MARKED_AS_PAID"])
|
|
@@ -34,6 +34,9 @@ module Tremendous
|
|
|
34
34
|
# A brief description of the transaction
|
|
35
35
|
attr_accessor :description
|
|
36
36
|
|
|
37
|
+
# ID of the payment behind the transaction, shown as \"Payment ID\" in the dashboard's balance transactions export and as \"Prefund confirmation\" on deposit receipts. Use it to match deposits, including auto-reloads, against your bank or card statements. Only present on transactions tied to a payment into your balance, such as deposits, the credit recorded when an order is paid by card or bank transfer, and transfers between organizations. Omitted otherwise, for example on the debit for an order paid from your balance.
|
|
38
|
+
attr_accessor :payment_id
|
|
39
|
+
|
|
37
40
|
attr_accessor :order
|
|
38
41
|
|
|
39
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -45,6 +48,7 @@ module Tremendous
|
|
|
45
48
|
:'balance' => :'balance',
|
|
46
49
|
:'action' => :'action',
|
|
47
50
|
:'description' => :'description',
|
|
51
|
+
:'payment_id' => :'payment_id',
|
|
48
52
|
:'order' => :'order'
|
|
49
53
|
}
|
|
50
54
|
end
|
|
@@ -68,6 +72,7 @@ module Tremendous
|
|
|
68
72
|
:'balance' => :'Float',
|
|
69
73
|
:'action' => :'String',
|
|
70
74
|
:'description' => :'String',
|
|
75
|
+
:'payment_id' => :'String',
|
|
71
76
|
:'order' => :'ListBalanceTransactions200ResponseTransactionsInnerOrder'
|
|
72
77
|
}
|
|
73
78
|
end
|
|
@@ -130,6 +135,10 @@ module Tremendous
|
|
|
130
135
|
self.description = nil
|
|
131
136
|
end
|
|
132
137
|
|
|
138
|
+
if attributes.key?(:'payment_id')
|
|
139
|
+
self.payment_id = attributes[:'payment_id']
|
|
140
|
+
end
|
|
141
|
+
|
|
133
142
|
if attributes.key?(:'order')
|
|
134
143
|
self.order = attributes[:'order']
|
|
135
144
|
end
|
|
@@ -251,6 +260,7 @@ module Tremendous
|
|
|
251
260
|
balance == o.balance &&
|
|
252
261
|
action == o.action &&
|
|
253
262
|
description == o.description &&
|
|
263
|
+
payment_id == o.payment_id &&
|
|
254
264
|
order == o.order
|
|
255
265
|
end
|
|
256
266
|
|
|
@@ -263,7 +273,7 @@ module Tremendous
|
|
|
263
273
|
# Calculates hash code according to all attributes.
|
|
264
274
|
# @return [Integer] Hash code
|
|
265
275
|
def hash
|
|
266
|
-
[created_at, amount, currency_code, balance, action, description, order].hash
|
|
276
|
+
[created_at, amount, currency_code, balance, action, description, payment_id, order].hash
|
|
267
277
|
end
|
|
268
278
|
|
|
269
279
|
# Builds the object from hash
|
|
@@ -19,7 +19,7 @@ module Tremendous
|
|
|
19
19
|
# The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released.
|
|
20
20
|
attr_accessor :status
|
|
21
21
|
|
|
22
|
-
# The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward amount limit` * `Over reward count limit` * `VPN detected` * `Apple Private Relay` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `Device on a Tremendous fraud list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` * `Allowed country`
|
|
22
|
+
# The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward amount limit` * `Over reward count limit` * `VPN detected` * `Apple Private Relay` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `Device on a Tremendous fraud list` * `IP on a Tremendous allow list` * `Bank account on a Tremendous allow list` * `Email on a Tremendous allow list` * `Phone on a Tremendous allow list` * `Device on a Tremendous allow list` * `IP related to a blocked reward` * `Device related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` * `Allowed country`
|
|
23
23
|
attr_accessor :reasons
|
|
24
24
|
|
|
25
25
|
# The device fingerprint, if known.
|
|
@@ -187,7 +187,7 @@ module Tremendous
|
|
|
187
187
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
188
188
|
status_validator = EnumAttributeValidator.new('String', ["flagged", "blocked", "released"])
|
|
189
189
|
return false unless status_validator.valid?(@status)
|
|
190
|
-
redemption_method_validator = EnumAttributeValidator.new('String', ["bank transfer", "charity", "instant debit transfer", "international bank transfer", "merchant card", "paypal", "venmo", "visa card"])
|
|
190
|
+
redemption_method_validator = EnumAttributeValidator.new('String', ["bank transfer", "cash app", "charity", "crypto", "instant debit transfer", "international bank transfer", "merchant card", "paypal", "recipient_promotion", "venmo", "visa card", "zelle"])
|
|
191
191
|
return false unless redemption_method_validator.valid?(@redemption_method)
|
|
192
192
|
true
|
|
193
193
|
end
|
|
@@ -227,9 +227,9 @@ module Tremendous
|
|
|
227
227
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
228
228
|
return false if @id.nil?
|
|
229
229
|
return false if @amount.nil?
|
|
230
|
-
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD"])
|
|
230
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD", "ILS", "AUD", "SGD", "HKD", "NZD", "MXN"])
|
|
231
231
|
return false unless currency_code_validator.valid?(@currency_code)
|
|
232
|
-
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD"])
|
|
232
|
+
currency_validator = EnumAttributeValidator.new('String', ["USD", "EUR", "GBP", "CAD", "ILS", "AUD", "SGD", "HKD", "NZD", "MXN"])
|
|
233
233
|
return false unless currency_validator.valid?(@currency)
|
|
234
234
|
return false if @status.nil?
|
|
235
235
|
status_validator = EnumAttributeValidator.new('String', ["DELETED", "PAID", "OPEN", "MARKED_AS_PAID"])
|
|
@@ -30,7 +30,7 @@ module Tremendous
|
|
|
30
30
|
# Additional classification for the product. Only applicable to products with a `category` of `merchant_card`. Possible subcategories: * `beauty_and_health` * `digital_financial_services` * `electronics` * `entertainment` * `fashion` * `food_and_drink` * `general_merchandise` * `grocery_and_supermarkets` * `home_and_living` * `mobility_and_fuel` * `sports_and_outdoor_gear` * `travel_and_hospitality`
|
|
31
31
|
attr_accessor :subcategory
|
|
32
32
|
|
|
33
|
-
# Legal disclosures for this product.
|
|
33
|
+
# Legal disclosures for this product, as an HTML fragment that uses basic formatting tags such as paragraphs, lists, links, and emphasis. Some products return plain text. Sanitize the value before rendering it.
|
|
34
34
|
attr_accessor :disclosure
|
|
35
35
|
|
|
36
36
|
# 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. The skus apply to orders in any of the product's `currency_codes`.
|
|
@@ -152,7 +152,7 @@ module Tremendous
|
|
|
152
152
|
return false if @max.nil?
|
|
153
153
|
return false if @max < 0
|
|
154
154
|
return false if @currency_code.nil?
|
|
155
|
-
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYN", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "GBP", "GEL", "GHS", "GNF", "GTQ", "HKD", "HNL", "
|
|
155
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYN", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "GBP", "GEL", "GHS", "GNF", "GTQ", "HKD", "HNL", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KHR", "KRW", "KWD", "KZT", "LBP", "LKR", "MAD", "MDL", "MGA", "MKD", "MMK", "MOP", "MUR", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SDG", "SEK", "SGD", "SOS", "SYP", "THB", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "UYU", "UZS", "VEF", "VND", "XAF", "XOF", "YER", "ZAR"])
|
|
156
156
|
return false unless currency_code_validator.valid?(@currency_code)
|
|
157
157
|
true
|
|
158
158
|
end
|
|
@@ -32,7 +32,7 @@ module Tremendous
|
|
|
32
32
|
|
|
33
33
|
attr_accessor :recipient
|
|
34
34
|
|
|
35
|
-
#
|
|
35
|
+
# Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.
|
|
36
36
|
attr_accessor :deliver_at
|
|
37
37
|
|
|
38
38
|
attr_accessor :custom_fields
|
|
@@ -119,7 +119,7 @@ module Tremendous
|
|
|
119
119
|
def valid?
|
|
120
120
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
121
121
|
return false if @denomination.nil?
|
|
122
|
-
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYN", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "GBP", "GEL", "GHS", "GNF", "GTQ", "HKD", "HNL", "
|
|
122
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYN", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "GBP", "GEL", "GHS", "GNF", "GTQ", "HKD", "HNL", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KHR", "KRW", "KWD", "KZT", "LBP", "LKR", "MAD", "MDL", "MGA", "MKD", "MMK", "MOP", "MUR", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SDG", "SEK", "SGD", "SOS", "SYP", "THB", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "UYU", "UZS", "VEF", "VND", "XAF", "XOF", "YER", "ZAR"])
|
|
123
123
|
return false unless currency_code_validator.valid?(@currency_code)
|
|
124
124
|
true
|
|
125
125
|
end
|
|
@@ -38,7 +38,7 @@ module Tremendous
|
|
|
38
38
|
|
|
39
39
|
attr_accessor :recipient
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.
|
|
42
42
|
attr_accessor :deliver_at
|
|
43
43
|
|
|
44
44
|
attr_accessor :custom_fields
|
|
@@ -30,7 +30,7 @@ module Tremendous
|
|
|
30
30
|
# Additional classification for the product. Only applicable to products with a `category` of `merchant_card`. Possible subcategories: * `beauty_and_health` * `digital_financial_services` * `electronics` * `entertainment` * `fashion` * `food_and_drink` * `general_merchandise` * `grocery_and_supermarkets` * `home_and_living` * `mobility_and_fuel` * `sports_and_outdoor_gear` * `travel_and_hospitality`
|
|
31
31
|
attr_accessor :subcategory
|
|
32
32
|
|
|
33
|
-
# Legal disclosures for this product.
|
|
33
|
+
# Legal disclosures for this product, as an HTML fragment that uses basic formatting tags such as paragraphs, lists, links, and emphasis. Some products return plain text. Sanitize the value before rendering it.
|
|
34
34
|
attr_accessor :disclosure
|
|
35
35
|
|
|
36
36
|
# 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. The skus apply to orders in any of the product's `currency_codes`.
|
|
@@ -38,7 +38,7 @@ module Tremendous
|
|
|
38
38
|
|
|
39
39
|
attr_accessor :recipient
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.
|
|
42
42
|
attr_accessor :deliver_at
|
|
43
43
|
|
|
44
44
|
attr_accessor :custom_fields
|
|
@@ -38,7 +38,7 @@ module Tremendous
|
|
|
38
38
|
|
|
39
39
|
attr_accessor :recipient
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.
|
|
42
42
|
attr_accessor :deliver_at
|
|
43
43
|
|
|
44
44
|
attr_accessor :custom_fields
|
|
@@ -38,7 +38,7 @@ module Tremendous
|
|
|
38
38
|
|
|
39
39
|
attr_accessor :recipient
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.
|
|
42
42
|
attr_accessor :deliver_at
|
|
43
43
|
|
|
44
44
|
attr_accessor :custom_fields
|
|
@@ -38,7 +38,7 @@ module Tremendous
|
|
|
38
38
|
|
|
39
39
|
attr_accessor :recipient
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.
|
|
42
42
|
attr_accessor :deliver_at
|
|
43
43
|
|
|
44
44
|
attr_accessor :custom_fields
|
|
@@ -119,7 +119,7 @@ module Tremendous
|
|
|
119
119
|
def valid?
|
|
120
120
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
121
121
|
return false if @denomination.nil?
|
|
122
|
-
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYN", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "GBP", "GEL", "GHS", "GNF", "GTQ", "HKD", "HNL", "
|
|
122
|
+
currency_code_validator = EnumAttributeValidator.new('String', ["USD", "CAD", "EUR", "AED", "AFN", "ALL", "AMD", "ARS", "AUD", "AZN", "BAM", "BDT", "BHD", "BIF", "BND", "BOB", "BRL", "BWP", "BYN", "BZD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "GBP", "GEL", "GHS", "GNF", "GTQ", "HKD", "HNL", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KHR", "KRW", "KWD", "KZT", "LBP", "LKR", "MAD", "MDL", "MGA", "MKD", "MMK", "MOP", "MUR", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SDG", "SEK", "SGD", "SOS", "SYP", "THB", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "UYU", "UZS", "VEF", "VND", "XAF", "XOF", "YER", "ZAR"])
|
|
123
123
|
return false unless currency_code_validator.valid?(@currency_code)
|
|
124
124
|
true
|
|
125
125
|
end
|
|
@@ -38,7 +38,7 @@ module Tremendous
|
|
|
38
38
|
|
|
39
39
|
attr_accessor :recipient
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.
|
|
42
42
|
attr_accessor :deliver_at
|
|
43
43
|
|
|
44
44
|
attr_accessor :custom_fields
|
|
@@ -38,7 +38,7 @@ module Tremendous
|
|
|
38
38
|
|
|
39
39
|
attr_accessor :recipient
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.
|
|
42
42
|
attr_accessor :deliver_at
|
|
43
43
|
|
|
44
44
|
attr_accessor :custom_fields
|
|
@@ -26,7 +26,7 @@ module Tremendous
|
|
|
26
26
|
|
|
27
27
|
attr_accessor :recipient
|
|
28
28
|
|
|
29
|
-
#
|
|
29
|
+
# Date of reward delivery, within the next year. The reward is delivered at 12pm in your organization's time zone on that date, or at 12pm Eastern Time when the organization has no time zone set. Note that if date-time is provided, the time values will be ignored.
|
|
30
30
|
attr_accessor :deliver_at
|
|
31
31
|
|
|
32
32
|
attr_accessor :custom_fields
|
data/lib/tremendous/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tremendous_ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 6.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tremendous Developers
|
|
@@ -336,7 +336,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
336
336
|
requirements:
|
|
337
337
|
- - ">="
|
|
338
338
|
- !ruby/object:Gem::Version
|
|
339
|
-
version: '
|
|
339
|
+
version: '3.3'
|
|
340
340
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
341
|
requirements:
|
|
342
342
|
- - ">="
|