create_order_body {tremendousr} | R Documentation |
Create order body
Description
Utility Function to Create an Order on Tremendous. For full API documentation, see https://developers.tremendous.com/reference/core-orders-create.
Usage
create_order_body(
recipient_name,
recipient_email = NULL,
recipient_phone = NULL,
reward_amount,
currency_code = "USD",
delivery_method = "EMAIL",
payment_description_id,
funding_source_id,
reward_types
)
Arguments
recipient_name |
Name of the recipient. |
recipient_email |
Email address of the recipient. |
recipient_phone |
Phone number of the recipient (US phone numbers only). |
reward_amount |
Amount of the reward (numeric). |
currency_code |
Currency of the reward (default to "USD"). |
delivery_method |
Default to "EMAIL", for sending the reward to the recipient via email. Alternatively, reward can be delivered via a link ("LINK") or text message ("PHONE"). |
payment_description_id |
Unique ID for specific order. This will appear
as |
funding_source_id |
ID of the funding source linked to your account, to
draw funds from for this order. One of the IDs from
|
reward_types |
A character vector of product ids – reward options – for the recipient to choose from. Available options can be found here. |
Value
A nested list that, when converted to JSON, is accepted by 'Tremendous' API's create order endpoint.