talon_one 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/docs/AddLoyaltyPoints.md +2 -2
- data/docs/CustomEffect.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse20010.md +3 -3
- data/docs/InlineResponse20011.md +3 -3
- data/docs/InlineResponse20012.md +1 -1
- data/docs/InlineResponse20013.md +2 -2
- data/docs/InlineResponse20014.md +3 -5
- data/docs/InlineResponse20015.md +4 -2
- data/docs/InlineResponse20016.md +2 -4
- data/docs/InlineResponse20017.md +4 -2
- data/docs/InlineResponse20018.md +2 -2
- data/docs/InlineResponse20019.md +1 -1
- data/docs/InlineResponse2002.md +3 -3
- data/docs/InlineResponse20020.md +2 -4
- data/docs/InlineResponse20021.md +3 -3
- data/docs/InlineResponse20022.md +1 -1
- data/docs/InlineResponse20023.md +3 -1
- data/docs/InlineResponse20024.md +1 -1
- data/docs/InlineResponse20025.md +2 -2
- data/docs/InlineResponse20026.md +2 -2
- data/docs/InlineResponse20027.md +3 -3
- data/docs/InlineResponse20028.md +3 -5
- data/docs/InlineResponse20029.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse20030.md +5 -3
- data/docs/InlineResponse20031.md +1 -1
- data/docs/InlineResponse20032.md +1 -1
- data/docs/InlineResponse20033.md +1 -1
- data/docs/InlineResponse20034.md +1 -1
- data/docs/InlineResponse20035.md +1 -1
- data/docs/InlineResponse20036.md +1 -1
- data/docs/InlineResponse20037.md +2 -4
- data/docs/InlineResponse20038.md +4 -2
- data/docs/InlineResponse20039.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse20040.md +19 -0
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +2 -2
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +1 -1
- data/docs/IntegrationApi.md +26 -26
- data/docs/ManagementApi.md +141 -141
- data/docs/MultiApplicationEntity.md +1 -1
- data/docs/NewCustomEffect.md +1 -1
- data/docs/NewOutgoingIntegrationWebhook.md +19 -0
- data/docs/NewWebhook.md +3 -3
- data/docs/OutgoingIntegrationConfiguration.md +3 -1
- data/docs/OutgoingIntegrationWebhookTemplate.md +3 -1
- data/docs/ReopenSessionResponse.md +17 -0
- data/docs/StrikethroughCustomEffectPerItemProps.md +21 -0
- data/docs/UpdateCustomEffect.md +1 -1
- data/docs/Webhook.md +3 -3
- data/lib/talon_one/api/integration_api.rb +48 -48
- data/lib/talon_one/api/management_api.rb +234 -234
- data/lib/talon_one/models/add_loyalty_points.rb +2 -2
- data/lib/talon_one/models/custom_effect.rb +1 -1
- data/lib/talon_one/models/inline_response2001.rb +1 -1
- data/lib/talon_one/models/inline_response20010.rb +11 -11
- data/lib/talon_one/models/inline_response20011.rb +11 -11
- data/lib/talon_one/models/inline_response20012.rb +1 -1
- data/lib/talon_one/models/inline_response20013.rb +1 -3
- data/lib/talon_one/models/inline_response20014.rb +9 -11
- data/lib/talon_one/models/inline_response20015.rb +11 -7
- data/lib/talon_one/models/inline_response20016.rb +7 -11
- data/lib/talon_one/models/inline_response20017.rb +11 -7
- data/lib/talon_one/models/inline_response20018.rb +10 -10
- data/lib/talon_one/models/inline_response20019.rb +1 -1
- data/lib/talon_one/models/inline_response2002.rb +11 -11
- data/lib/talon_one/models/inline_response20020.rb +7 -11
- data/lib/talon_one/models/inline_response20021.rb +10 -10
- data/lib/talon_one/models/inline_response20022.rb +1 -1
- data/lib/talon_one/models/inline_response20023.rb +10 -6
- data/lib/talon_one/models/inline_response20024.rb +1 -1
- data/lib/talon_one/models/inline_response20025.rb +6 -1
- data/lib/talon_one/models/inline_response20026.rb +1 -6
- data/lib/talon_one/models/inline_response20027.rb +11 -11
- data/lib/talon_one/models/inline_response20028.rb +7 -11
- data/lib/talon_one/models/inline_response20029.rb +1 -1
- data/lib/talon_one/models/inline_response2003.rb +1 -1
- data/lib/talon_one/models/inline_response20030.rb +11 -7
- data/lib/talon_one/models/inline_response20031.rb +1 -1
- data/lib/talon_one/models/inline_response20032.rb +1 -1
- data/lib/talon_one/models/inline_response20033.rb +1 -1
- data/lib/talon_one/models/inline_response20034.rb +1 -1
- data/lib/talon_one/models/inline_response20035.rb +1 -1
- data/lib/talon_one/models/inline_response20036.rb +1 -1
- data/lib/talon_one/models/inline_response20037.rb +7 -11
- data/lib/talon_one/models/inline_response20038.rb +11 -7
- data/lib/talon_one/models/inline_response20039.rb +1 -1
- data/lib/talon_one/models/inline_response2004.rb +1 -1
- data/lib/talon_one/models/inline_response20040.rb +227 -0
- data/lib/talon_one/models/inline_response2005.rb +1 -1
- data/lib/talon_one/models/inline_response2006.rb +1 -1
- data/lib/talon_one/models/inline_response2007.rb +10 -10
- data/lib/talon_one/models/inline_response2008.rb +1 -1
- data/lib/talon_one/models/inline_response2009.rb +1 -1
- data/lib/talon_one/models/multi_application_entity.rb +1 -1
- data/lib/talon_one/models/new_custom_effect.rb +1 -1
- data/lib/talon_one/models/new_outgoing_integration_webhook.rb +229 -0
- data/lib/talon_one/models/new_webhook.rb +3 -3
- data/lib/talon_one/models/outgoing_integration_configuration.rb +16 -1
- data/lib/talon_one/models/outgoing_integration_webhook_template.rb +53 -4
- data/lib/talon_one/models/reopen_session_response.rb +215 -0
- data/lib/talon_one/models/strikethrough_custom_effect_per_item_props.rb +243 -0
- data/lib/talon_one/models/update_custom_effect.rb +1 -1
- data/lib/talon_one/models/webhook.rb +3 -3
- data/lib/talon_one/version.rb +1 -1
- data/lib/talon_one.rb +4 -0
- data/spec/api/integration_api_spec.rb +9 -9
- data/spec/api/management_api_spec.rb +59 -59
- data/spec/models/inline_response20010_spec.rb +1 -1
- data/spec/models/inline_response20011_spec.rb +1 -1
- data/spec/models/inline_response20014_spec.rb +0 -6
- data/spec/models/inline_response20015_spec.rb +6 -0
- data/spec/models/inline_response20016_spec.rb +0 -6
- data/spec/models/inline_response20017_spec.rb +6 -0
- data/spec/models/inline_response20018_spec.rb +1 -1
- data/spec/models/inline_response20020_spec.rb +0 -6
- data/spec/models/inline_response20021_spec.rb +2 -2
- data/spec/models/inline_response20023_spec.rb +6 -0
- data/spec/models/inline_response20027_spec.rb +1 -1
- data/spec/models/inline_response20028_spec.rb +0 -6
- data/spec/models/inline_response2002_spec.rb +1 -1
- data/spec/models/inline_response20030_spec.rb +6 -0
- data/spec/models/inline_response20037_spec.rb +0 -6
- data/spec/models/inline_response20038_spec.rb +6 -0
- data/spec/models/inline_response20040_spec.rb +47 -0
- data/spec/models/inline_response2007_spec.rb +1 -1
- data/spec/models/new_outgoing_integration_webhook_spec.rb +47 -0
- data/spec/models/outgoing_integration_configuration_spec.rb +6 -0
- data/spec/models/outgoing_integration_webhook_template_spec.rb +10 -0
- data/spec/models/reopen_session_response_spec.rb +41 -0
- data/spec/models/strikethrough_custom_effect_per_item_props_spec.rb +53 -0
- metadata +18 -2
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**application_ids** | **Array<Integer>** | The IDs of the
|
7
|
+
**application_ids** | **Array<Integer>** | The IDs of the Applications that are related to this entity. |
|
8
8
|
|
9
9
|
## Code Sample
|
10
10
|
|
data/docs/NewCustomEffect.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**application_ids** | **Array<Integer>** | The IDs of the
|
7
|
+
**application_ids** | **Array<Integer>** | The IDs of the Applications that are related to this entity. |
|
8
8
|
**is_per_item** | **Boolean** | Indicates if this effect is per item or not. | [optional]
|
9
9
|
**name** | **String** | The name of this effect. |
|
10
10
|
**title** | **String** | The title of this effect. |
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# TalonOne::NewOutgoingIntegrationWebhook
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**title** | **String** | Webhook title. |
|
8
|
+
**application_ids** | **Array<Integer>** | IDs of the Applications to which a webhook must be linked. |
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'TalonOne'
|
14
|
+
|
15
|
+
instance = TalonOne::NewOutgoingIntegrationWebhook.new(title: Send email to customer via Braze,
|
16
|
+
application_ids: [1, 2, 3])
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/NewWebhook.md
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**application_ids** | **Array<Integer>** | The IDs of the
|
7
|
+
**application_ids** | **Array<Integer>** | The IDs of the Applications that are related to this entity. |
|
8
8
|
**title** | **String** | Name or title for this webhook. |
|
9
9
|
**verb** | **String** | API method for this webhook. |
|
10
|
-
**url** | **String** | API
|
10
|
+
**url** | **String** | API URL (supports templating using parameters) for this webhook. |
|
11
11
|
**headers** | **Array<String>** | List of API HTTP headers for this webhook. |
|
12
12
|
**payload** | **String** | API payload (supports templating using parameters) for this webhook. | [optional]
|
13
13
|
**params** | [**Array<TemplateArgDef>**](TemplateArgDef.md) | Array of template argument definitions. |
|
14
|
-
**enabled** | **Boolean** | Enables or disables webhook from showing in
|
14
|
+
**enabled** | **Boolean** | Enables or disables webhook from showing in the Rule Builder. |
|
15
15
|
|
16
16
|
## Code Sample
|
17
17
|
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **Integer** | Unique ID for this entity. |
|
7
8
|
**account_id** | **Integer** | The ID of the account to which this configuration belongs. |
|
8
9
|
**type_id** | **Integer** | The outgoing integration type ID. |
|
9
10
|
**policy** | [**Object**](.md) | |
|
@@ -13,7 +14,8 @@ Name | Type | Description | Notes
|
|
13
14
|
```ruby
|
14
15
|
require 'TalonOne'
|
15
16
|
|
16
|
-
instance = TalonOne::OutgoingIntegrationConfiguration.new(
|
17
|
+
instance = TalonOne::OutgoingIntegrationConfiguration.new(id: 6,
|
18
|
+
account_id: 3886,
|
17
19
|
type_id: 12,
|
18
20
|
policy: null)
|
19
21
|
```
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
**title** | **String** | Title of the webhook template. |
|
10
10
|
**description** | **String** | General description for the specific outgoing integration webhook template. |
|
11
11
|
**payload** | **String** | API payload (supports templating using parameters) for this webhook template. |
|
12
|
+
**method** | **String** | API method for this webhook. |
|
12
13
|
|
13
14
|
## Code Sample
|
14
15
|
|
@@ -21,7 +22,8 @@ instance = TalonOne::OutgoingIntegrationWebhookTemplate.new(id: 6,
|
|
21
22
|
description: Waiting for docs team,
|
22
23
|
payload: {
|
23
24
|
"message": "${message}"
|
24
|
-
}
|
25
|
+
},
|
26
|
+
method: POST)
|
25
27
|
```
|
26
28
|
|
27
29
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# TalonOne::ReopenSessionResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**effects** | [**Array<Effect>**](Effect.md) | The effects generated by the rules in your running campaigns. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'TalonOne'
|
13
|
+
|
14
|
+
instance = TalonOne::ReopenSessionResponse.new(effects: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# TalonOne::StrikethroughCustomEffectPerItemProps
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**effect_id** | **Integer** | ID of the effect. |
|
8
|
+
**name** | **String** | The type of the custom effect. |
|
9
|
+
**payload** | [**Object**](.md) | The JSON payload of the custom effect. |
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'TalonOne'
|
15
|
+
|
16
|
+
instance = TalonOne::StrikethroughCustomEffectPerItemProps.new(effect_id: 1,
|
17
|
+
name: my_custom_effect,
|
18
|
+
payload: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/UpdateCustomEffect.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**application_ids** | **Array<Integer>** | The IDs of the
|
7
|
+
**application_ids** | **Array<Integer>** | The IDs of the Applications that are related to this entity. |
|
8
8
|
**is_per_item** | **Boolean** | Indicates if this effect is per item or not. | [optional]
|
9
9
|
**name** | **String** | The name of this effect. |
|
10
10
|
**title** | **String** | The title of this effect. |
|
data/docs/Webhook.md
CHANGED
@@ -7,14 +7,14 @@ Name | Type | Description | Notes
|
|
7
7
|
**id** | **Integer** | Internal ID of this entity. |
|
8
8
|
**created** | **DateTime** | The time this entity was created. |
|
9
9
|
**modified** | **DateTime** | The time this entity was last modified. |
|
10
|
-
**application_ids** | **Array<Integer>** | The IDs of the
|
10
|
+
**application_ids** | **Array<Integer>** | The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity. |
|
11
11
|
**title** | **String** | Name or title for this webhook. |
|
12
12
|
**verb** | **String** | API method for this webhook. |
|
13
|
-
**url** | **String** | API
|
13
|
+
**url** | **String** | API URL (supports templating using parameters) for this webhook. |
|
14
14
|
**headers** | **Array<String>** | List of API HTTP headers for this webhook. |
|
15
15
|
**payload** | **String** | API payload (supports templating using parameters) for this webhook. | [optional]
|
16
16
|
**params** | [**Array<TemplateArgDef>**](TemplateArgDef.md) | Array of template argument definitions. |
|
17
|
-
**enabled** | **Boolean** | Enables or disables webhook from showing in
|
17
|
+
**enabled** | **Boolean** | Enables or disables webhook from showing in the Rule Builder. |
|
18
18
|
|
19
19
|
## Code Sample
|
20
20
|
|
@@ -750,26 +750,26 @@ module TalonOne
|
|
750
750
|
return data, status_code, headers
|
751
751
|
end
|
752
752
|
|
753
|
-
# Get
|
753
|
+
# Get card's point balances
|
754
754
|
# Retrieve loyalty balances for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, all loyalty balances for the given loyalty card are returned.
|
755
755
|
# @param loyalty_program_id [Integer] Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
756
|
-
# @param
|
756
|
+
# @param loyalty_card_id [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
757
757
|
# @param [Hash] opts the optional parameters
|
758
758
|
# @option opts [DateTime] :end_date Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string.
|
759
759
|
# @return [LoyaltyBalances]
|
760
|
-
def get_loyalty_card_balances(loyalty_program_id,
|
761
|
-
data, _status_code, _headers = get_loyalty_card_balances_with_http_info(loyalty_program_id,
|
760
|
+
def get_loyalty_card_balances(loyalty_program_id, loyalty_card_id, opts = {})
|
761
|
+
data, _status_code, _headers = get_loyalty_card_balances_with_http_info(loyalty_program_id, loyalty_card_id, opts)
|
762
762
|
data
|
763
763
|
end
|
764
764
|
|
765
|
-
# Get
|
765
|
+
# Get card's point balances
|
766
766
|
# Retrieve loyalty balances for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, all loyalty balances for the given loyalty card are returned.
|
767
767
|
# @param loyalty_program_id [Integer] Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
768
|
-
# @param
|
768
|
+
# @param loyalty_card_id [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
769
769
|
# @param [Hash] opts the optional parameters
|
770
770
|
# @option opts [DateTime] :end_date Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string.
|
771
771
|
# @return [Array<(LoyaltyBalances, Integer, Hash)>] LoyaltyBalances data, response status code and response headers
|
772
|
-
def get_loyalty_card_balances_with_http_info(loyalty_program_id,
|
772
|
+
def get_loyalty_card_balances_with_http_info(loyalty_program_id, loyalty_card_id, opts = {})
|
773
773
|
if @api_client.config.debugging
|
774
774
|
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_loyalty_card_balances ...'
|
775
775
|
end
|
@@ -777,16 +777,16 @@ module TalonOne
|
|
777
777
|
if @api_client.config.client_side_validation && loyalty_program_id.nil?
|
778
778
|
fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.get_loyalty_card_balances"
|
779
779
|
end
|
780
|
-
# verify the required parameter '
|
781
|
-
if @api_client.config.client_side_validation &&
|
782
|
-
fail ArgumentError, "Missing the required parameter '
|
780
|
+
# verify the required parameter 'loyalty_card_id' is set
|
781
|
+
if @api_client.config.client_side_validation && loyalty_card_id.nil?
|
782
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling IntegrationApi.get_loyalty_card_balances"
|
783
783
|
end
|
784
|
-
if @api_client.config.client_side_validation &&
|
785
|
-
fail ArgumentError, 'invalid value for "
|
784
|
+
if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
|
785
|
+
fail ArgumentError, 'invalid value for "loyalty_card_id" when calling IntegrationApi.get_loyalty_card_balances, the character length must be smaller than or equal to 108.'
|
786
786
|
end
|
787
787
|
|
788
788
|
# resource path
|
789
|
-
local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{
|
789
|
+
local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)).sub('{' + 'loyaltyCardId' + '}', CGI.escape(loyalty_card_id.to_s))
|
790
790
|
|
791
791
|
# query parameters
|
792
792
|
query_params = opts[:query_params] || {}
|
@@ -825,34 +825,34 @@ module TalonOne
|
|
825
825
|
return data, status_code, headers
|
826
826
|
end
|
827
827
|
|
828
|
-
#
|
828
|
+
# List card's transactions
|
829
829
|
# Retrieve loyalty transaction logs for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned.
|
830
830
|
# @param loyalty_program_id [Integer] Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
831
|
-
# @param
|
831
|
+
# @param loyalty_card_id [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
832
832
|
# @param [Hash] opts the optional parameters
|
833
833
|
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
834
834
|
# @option opts [DateTime] :start_date Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
835
835
|
# @option opts [DateTime] :end_date Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
836
836
|
# @option opts [Integer] :page_size The number of items in this response. (default to 1000)
|
837
837
|
# @option opts [Integer] :skip Skips the given number of items when paging through large result sets.
|
838
|
-
# @return [
|
839
|
-
def get_loyalty_card_transactions(loyalty_program_id,
|
840
|
-
data, _status_code, _headers = get_loyalty_card_transactions_with_http_info(loyalty_program_id,
|
838
|
+
# @return [InlineResponse2001]
|
839
|
+
def get_loyalty_card_transactions(loyalty_program_id, loyalty_card_id, opts = {})
|
840
|
+
data, _status_code, _headers = get_loyalty_card_transactions_with_http_info(loyalty_program_id, loyalty_card_id, opts)
|
841
841
|
data
|
842
842
|
end
|
843
843
|
|
844
|
-
#
|
844
|
+
# List card's transactions
|
845
845
|
# Retrieve loyalty transaction logs for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned.
|
846
846
|
# @param loyalty_program_id [Integer] Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
847
|
-
# @param
|
847
|
+
# @param loyalty_card_id [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
848
848
|
# @param [Hash] opts the optional parameters
|
849
849
|
# @option opts [String] :subledger_id The ID of the subledger by which we filter the data.
|
850
850
|
# @option opts [DateTime] :start_date Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
851
851
|
# @option opts [DateTime] :end_date Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
852
852
|
# @option opts [Integer] :page_size The number of items in this response.
|
853
853
|
# @option opts [Integer] :skip Skips the given number of items when paging through large result sets.
|
854
|
-
# @return [Array<(
|
855
|
-
def get_loyalty_card_transactions_with_http_info(loyalty_program_id,
|
854
|
+
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
|
855
|
+
def get_loyalty_card_transactions_with_http_info(loyalty_program_id, loyalty_card_id, opts = {})
|
856
856
|
if @api_client.config.debugging
|
857
857
|
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_loyalty_card_transactions ...'
|
858
858
|
end
|
@@ -860,12 +860,12 @@ module TalonOne
|
|
860
860
|
if @api_client.config.client_side_validation && loyalty_program_id.nil?
|
861
861
|
fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.get_loyalty_card_transactions"
|
862
862
|
end
|
863
|
-
# verify the required parameter '
|
864
|
-
if @api_client.config.client_side_validation &&
|
865
|
-
fail ArgumentError, "Missing the required parameter '
|
863
|
+
# verify the required parameter 'loyalty_card_id' is set
|
864
|
+
if @api_client.config.client_side_validation && loyalty_card_id.nil?
|
865
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling IntegrationApi.get_loyalty_card_transactions"
|
866
866
|
end
|
867
|
-
if @api_client.config.client_side_validation &&
|
868
|
-
fail ArgumentError, 'invalid value for "
|
867
|
+
if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
|
868
|
+
fail ArgumentError, 'invalid value for "loyalty_card_id" when calling IntegrationApi.get_loyalty_card_transactions, the character length must be smaller than or equal to 108.'
|
869
869
|
end
|
870
870
|
|
871
871
|
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
|
@@ -877,7 +877,7 @@ module TalonOne
|
|
877
877
|
end
|
878
878
|
|
879
879
|
# resource path
|
880
|
-
local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{
|
880
|
+
local_var_path = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactions'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)).sub('{' + 'loyaltyCardId' + '}', CGI.escape(loyalty_card_id.to_s))
|
881
881
|
|
882
882
|
# query parameters
|
883
883
|
query_params = opts[:query_params] || {}
|
@@ -899,7 +899,7 @@ module TalonOne
|
|
899
899
|
post_body = opts[:body]
|
900
900
|
|
901
901
|
# return_type
|
902
|
-
return_type = opts[:return_type] || '
|
902
|
+
return_type = opts[:return_type] || 'InlineResponse2001'
|
903
903
|
|
904
904
|
# auth_names
|
905
905
|
auth_names = opts[:auth_names] || ['api_key_v1']
|
@@ -930,7 +930,7 @@ module TalonOne
|
|
930
930
|
# @option opts [DateTime] :end_date Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
931
931
|
# @option opts [Integer] :page_size The number of items in this response. (default to 50)
|
932
932
|
# @option opts [Integer] :skip Skips the given number of items when paging through large result sets.
|
933
|
-
# @return [
|
933
|
+
# @return [InlineResponse2002]
|
934
934
|
def get_loyalty_program_profile_transactions(loyalty_program_id, integration_id, opts = {})
|
935
935
|
data, _status_code, _headers = get_loyalty_program_profile_transactions_with_http_info(loyalty_program_id, integration_id, opts)
|
936
936
|
data
|
@@ -946,7 +946,7 @@ module TalonOne
|
|
946
946
|
# @option opts [DateTime] :end_date Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string.
|
947
947
|
# @option opts [Integer] :page_size The number of items in this response.
|
948
948
|
# @option opts [Integer] :skip Skips the given number of items when paging through large result sets.
|
949
|
-
# @return [Array<(
|
949
|
+
# @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
|
950
950
|
def get_loyalty_program_profile_transactions_with_http_info(loyalty_program_id, integration_id, opts = {})
|
951
951
|
if @api_client.config.debugging
|
952
952
|
@api_client.config.logger.debug 'Calling API: IntegrationApi.get_loyalty_program_profile_transactions ...'
|
@@ -990,7 +990,7 @@ module TalonOne
|
|
990
990
|
post_body = opts[:body]
|
991
991
|
|
992
992
|
# return_type
|
993
|
-
return_type = opts[:return_type] || '
|
993
|
+
return_type = opts[:return_type] || 'InlineResponse2002'
|
994
994
|
|
995
995
|
# auth_names
|
996
996
|
auth_names = opts[:auth_names] || ['api_key_v1']
|
@@ -1073,26 +1073,26 @@ module TalonOne
|
|
1073
1073
|
return data, status_code, headers
|
1074
1074
|
end
|
1075
1075
|
|
1076
|
-
# Link customer profile to
|
1076
|
+
# Link customer profile to card
|
1077
1077
|
# [Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/loyalty-card-overview) allow customers to collect and spend loyalty points within a [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). They are useful to gamify loyalty programs and can be used with or without customer profiles linked to them. Link a customer profile to a given loyalty card for the card to be set as **Registered**. This affects how it can be used. See the [docs](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/managing-loyalty-cards#linking-customer-profiles-to-a-loyalty-card). **Note:** You can link as many customer profiles to a given loyalty card as the [**card user limit**](https://docs.talon.one/docs/product/loyalty-programs/creating-loyalty-programs#creating-card-based-loyalty-programs) allows.
|
1078
1078
|
# @param loyalty_program_id [Integer] Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
1079
|
-
# @param
|
1079
|
+
# @param loyalty_card_id [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
1080
1080
|
# @param body [LoyaltyCardRegistration] body
|
1081
1081
|
# @param [Hash] opts the optional parameters
|
1082
1082
|
# @return [LoyaltyCard]
|
1083
|
-
def link_loyalty_card_to_profile(loyalty_program_id,
|
1084
|
-
data, _status_code, _headers = link_loyalty_card_to_profile_with_http_info(loyalty_program_id,
|
1083
|
+
def link_loyalty_card_to_profile(loyalty_program_id, loyalty_card_id, body, opts = {})
|
1084
|
+
data, _status_code, _headers = link_loyalty_card_to_profile_with_http_info(loyalty_program_id, loyalty_card_id, body, opts)
|
1085
1085
|
data
|
1086
1086
|
end
|
1087
1087
|
|
1088
|
-
# Link customer profile to
|
1088
|
+
# Link customer profile to card
|
1089
1089
|
# [Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/loyalty-card-overview) allow customers to collect and spend loyalty points within a [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). They are useful to gamify loyalty programs and can be used with or without customer profiles linked to them. Link a customer profile to a given loyalty card for the card to be set as **Registered**. This affects how it can be used. See the [docs](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/managing-loyalty-cards#linking-customer-profiles-to-a-loyalty-card). **Note:** You can link as many customer profiles to a given loyalty card as the [**card user limit**](https://docs.talon.one/docs/product/loyalty-programs/creating-loyalty-programs#creating-card-based-loyalty-programs) allows.
|
1090
1090
|
# @param loyalty_program_id [Integer] Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint.
|
1091
|
-
# @param
|
1091
|
+
# @param loyalty_card_id [String] Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint.
|
1092
1092
|
# @param body [LoyaltyCardRegistration] body
|
1093
1093
|
# @param [Hash] opts the optional parameters
|
1094
1094
|
# @return [Array<(LoyaltyCard, Integer, Hash)>] LoyaltyCard data, response status code and response headers
|
1095
|
-
def link_loyalty_card_to_profile_with_http_info(loyalty_program_id,
|
1095
|
+
def link_loyalty_card_to_profile_with_http_info(loyalty_program_id, loyalty_card_id, body, opts = {})
|
1096
1096
|
if @api_client.config.debugging
|
1097
1097
|
@api_client.config.logger.debug 'Calling API: IntegrationApi.link_loyalty_card_to_profile ...'
|
1098
1098
|
end
|
@@ -1100,12 +1100,12 @@ module TalonOne
|
|
1100
1100
|
if @api_client.config.client_side_validation && loyalty_program_id.nil?
|
1101
1101
|
fail ArgumentError, "Missing the required parameter 'loyalty_program_id' when calling IntegrationApi.link_loyalty_card_to_profile"
|
1102
1102
|
end
|
1103
|
-
# verify the required parameter '
|
1104
|
-
if @api_client.config.client_side_validation &&
|
1105
|
-
fail ArgumentError, "Missing the required parameter '
|
1103
|
+
# verify the required parameter 'loyalty_card_id' is set
|
1104
|
+
if @api_client.config.client_side_validation && loyalty_card_id.nil?
|
1105
|
+
fail ArgumentError, "Missing the required parameter 'loyalty_card_id' when calling IntegrationApi.link_loyalty_card_to_profile"
|
1106
1106
|
end
|
1107
|
-
if @api_client.config.client_side_validation &&
|
1108
|
-
fail ArgumentError, 'invalid value for "
|
1107
|
+
if @api_client.config.client_side_validation && loyalty_card_id.to_s.length > 108
|
1108
|
+
fail ArgumentError, 'invalid value for "loyalty_card_id" when calling IntegrationApi.link_loyalty_card_to_profile, the character length must be smaller than or equal to 108.'
|
1109
1109
|
end
|
1110
1110
|
|
1111
1111
|
# verify the required parameter 'body' is set
|
@@ -1113,7 +1113,7 @@ module TalonOne
|
|
1113
1113
|
fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationApi.link_loyalty_card_to_profile"
|
1114
1114
|
end
|
1115
1115
|
# resource path
|
1116
|
-
local_var_path = '/v2/loyalty_programs/{loyaltyProgramId}/cards/{
|
1116
|
+
local_var_path = '/v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile'.sub('{' + 'loyaltyProgramId' + '}', CGI.escape(loyalty_program_id.to_s)).sub('{' + 'loyaltyCardId' + '}', CGI.escape(loyalty_card_id.to_s))
|
1117
1117
|
|
1118
1118
|
# query parameters
|
1119
1119
|
query_params = opts[:query_params] || {}
|
@@ -1157,7 +1157,7 @@ module TalonOne
|
|
1157
1157
|
# Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities#customer-session). For example, if a session has been completed but still needs to be edited, you can reopen it with this endpoint. A reopen session is treated like a standard open session. When reopening a session: - The `talon_session_reopened` event is triggered. You can see it in the **Events** view in the Campaign Manager. - The session state is updated to `open`. - Modified budgets and triggered effects when the session was closed are rolled back except for the list below. <details> <summary><strong>Effects and budgets unimpacted by a session reopening</strong></summary> <div> <p>The following effects and budgets are left the way they were once the session was originally closed:</p> <ul> <li>Add free item effect</li> <li>Any <strong>not pending</strong> pending loyalty points.</li> <li>Award giveaway</li> <li>Coupon and referral creation</li> <li>Coupon reservation</li> <li>Custom effect</li> <li>Update attribute value</li> <li>Update cart item attribute value</li> </ul> </div> <p>To see an example of roll back, see the <a href=\"https://docs.talon.one/docs/dev/tutorials/rolling-back-effects\">Cancelling a session with campaign budgets tutorial</a>.</p> </details> **Note:** If your order workflow requires you to create a new session instead of reopening a session, use the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint to cancel a closed session and create a new one.
|
1158
1158
|
# @param customer_session_id [String] The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
|
1159
1159
|
# @param [Hash] opts the optional parameters
|
1160
|
-
# @return [
|
1160
|
+
# @return [ReopenSessionResponse]
|
1161
1161
|
def reopen_customer_session(customer_session_id, opts = {})
|
1162
1162
|
data, _status_code, _headers = reopen_customer_session_with_http_info(customer_session_id, opts)
|
1163
1163
|
data
|
@@ -1167,7 +1167,7 @@ module TalonOne
|
|
1167
1167
|
# Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities#customer-session). For example, if a session has been completed but still needs to be edited, you can reopen it with this endpoint. A reopen session is treated like a standard open session. When reopening a session: - The `talon_session_reopened` event is triggered. You can see it in the **Events** view in the Campaign Manager. - The session state is updated to `open`. - Modified budgets and triggered effects when the session was closed are rolled back except for the list below. <details> <summary><strong>Effects and budgets unimpacted by a session reopening</strong></summary> <div> <p>The following effects and budgets are left the way they were once the session was originally closed:</p> <ul> <li>Add free item effect</li> <li>Any <strong>not pending</strong> pending loyalty points.</li> <li>Award giveaway</li> <li>Coupon and referral creation</li> <li>Coupon reservation</li> <li>Custom effect</li> <li>Update attribute value</li> <li>Update cart item attribute value</li> </ul> </div> <p>To see an example of roll back, see the <a href=\"https://docs.talon.one/docs/dev/tutorials/rolling-back-effects\">Cancelling a session with campaign budgets tutorial</a>.</p> </details> **Note:** If your order workflow requires you to create a new session instead of reopening a session, use the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint to cancel a closed session and create a new one.
|
1168
1168
|
# @param customer_session_id [String] The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint.
|
1169
1169
|
# @param [Hash] opts the optional parameters
|
1170
|
-
# @return [Array<(
|
1170
|
+
# @return [Array<(ReopenSessionResponse, Integer, Hash)>] ReopenSessionResponse data, response status code and response headers
|
1171
1171
|
def reopen_customer_session_with_http_info(customer_session_id, opts = {})
|
1172
1172
|
if @api_client.config.debugging
|
1173
1173
|
@api_client.config.logger.debug 'Calling API: IntegrationApi.reopen_customer_session ...'
|
@@ -1194,7 +1194,7 @@ module TalonOne
|
|
1194
1194
|
post_body = opts[:body]
|
1195
1195
|
|
1196
1196
|
# return_type
|
1197
|
-
return_type = opts[:return_type] || '
|
1197
|
+
return_type = opts[:return_type] || 'ReopenSessionResponse'
|
1198
1198
|
|
1199
1199
|
# auth_names
|
1200
1200
|
auth_names = opts[:auth_names] || ['api_key_v1']
|