ultracart_api 4.1.134 → 4.1.136
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/README.md +9 -2
- data/docs/AdjustLoyaltyPointsRequest.md +24 -0
- data/docs/AdjustLoyaltyPointsResponse.md +30 -0
- data/docs/ConversationPbxMenuMapping.md +2 -0
- data/docs/CustomerApi.md +109 -0
- data/docs/CustomerLoyaltyResponse.md +26 -0
- data/lib/ultracart_api/api/customer_api.rb +139 -0
- data/lib/ultracart_api/models/adjust_loyalty_points_request.rb +250 -0
- data/lib/ultracart_api/models/adjust_loyalty_points_response.rb +277 -0
- data/lib/ultracart_api/models/conversation_pbx_menu_mapping.rb +26 -1
- data/lib/ultracart_api/models/customer_loyalty_response.rb +256 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ab1f7526673cdcb1a99d61bf3befc9b24ebb910c4fe4917c529a4826a18dbd3
|
|
4
|
+
data.tar.gz: 2e63388dec8bcdb0a7bb9abfadebd8dc1048755da6928a27d9b8de5ca2bec676
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da5f2c3d2c64a380d5ae5b04dd2c53cad336723e9814751bdb9f02ca73816f2618bfb8f2b2246423cb86918b25c6878a7699294f6a119899b66ac98ee5ae70ad
|
|
7
|
+
data.tar.gz: 89747bb0a739ce9dd9006e6c5e25c0763b8f5f9e1bcdcc8677f54b49c480627820b683acba615d86bde23bb1e9a030000406697dd925e21e9ac67e66491e4ab7
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: 2.0.0
|
|
10
|
-
- Package version: 4.1.
|
|
10
|
+
- Package version: 4.1.136
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
12
|
- For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
|
|
|
16
16
|
gemfile:
|
|
17
17
|
|
|
18
18
|
```shell
|
|
19
|
-
gem 'ultracart_api', '4.1.
|
|
19
|
+
gem 'ultracart_api', '4.1.136'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -315,12 +315,14 @@ Class | Method | HTTP request | Description
|
|
|
315
315
|
*UltracartClient::CouponApi* | [**upload_coupon_codes**](docs/CouponApi.md#upload_coupon_codes) | **POST** /coupon/coupons/{coupon_oid}/upload_codes | Upload one-time codes for a coupon
|
|
316
316
|
*UltracartClient::CustomerApi* | [**add_customer_store_credit**](docs/CustomerApi.md#add_customer_store_credit) | **POST** /customer/customers/{customer_profile_oid}/store_credit | Adds store credit to a customer
|
|
317
317
|
*UltracartClient::CustomerApi* | [**adjust_internal_certificate**](docs/CustomerApi.md#adjust_internal_certificate) | **POST** /customer/customers/{customer_profile_oid}/adjust_cashback_balance | Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed.
|
|
318
|
+
*UltracartClient::CustomerApi* | [**adjust_loyalty_points**](docs/CustomerApi.md#adjust_loyalty_points) | **POST** /customer/customers/{customer_profile_oid}/adjust_loyalty_points | Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
318
319
|
*UltracartClient::CustomerApi* | [**delete_customer**](docs/CustomerApi.md#delete_customer) | **DELETE** /customer/customers/{customer_profile_oid} | Delete a customer
|
|
319
320
|
*UltracartClient::CustomerApi* | [**delete_wish_list_item**](docs/CustomerApi.md#delete_wish_list_item) | **DELETE** /customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid} | Delete a customer wishlist item
|
|
320
321
|
*UltracartClient::CustomerApi* | [**get_customer**](docs/CustomerApi.md#get_customer) | **GET** /customer/customers/{customer_profile_oid} | Retrieve a customer
|
|
321
322
|
*UltracartClient::CustomerApi* | [**get_customer_by_email**](docs/CustomerApi.md#get_customer_by_email) | **GET** /customer/customers/by_email/{email} | Retrieve a customer by Email
|
|
322
323
|
*UltracartClient::CustomerApi* | [**get_customer_editor_values**](docs/CustomerApi.md#get_customer_editor_values) | **GET** /customer/editor_values | Retrieve values needed for a customer profile editor
|
|
323
324
|
*UltracartClient::CustomerApi* | [**get_customer_email_lists**](docs/CustomerApi.md#get_customer_email_lists) | **GET** /customer/email_lists | Retrieve all email lists across all storefronts
|
|
325
|
+
*UltracartClient::CustomerApi* | [**get_customer_loyalty**](docs/CustomerApi.md#get_customer_loyalty) | **GET** /customer/customers/{customer_profile_oid}/loyalty | Retrieve the loyalty points, ledger and redemptions for a customer
|
|
324
326
|
*UltracartClient::CustomerApi* | [**get_customer_store_credit**](docs/CustomerApi.md#get_customer_store_credit) | **GET** /customer/customers/{customer_profile_oid}/store_credit | Retrieve the customer store credit accumulated through loyalty programs
|
|
325
327
|
*UltracartClient::CustomerApi* | [**get_customer_wish_list**](docs/CustomerApi.md#get_customer_wish_list) | **GET** /customer/customers/{customer_profile_oid}/wishlist | Retrieve wishlist items for customer
|
|
326
328
|
*UltracartClient::CustomerApi* | [**get_customer_wish_list_item**](docs/CustomerApi.md#get_customer_wish_list_item) | **GET** /customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid} | Retrieve wishlist item for customer
|
|
@@ -734,6 +736,8 @@ Class | Method | HTTP request | Description
|
|
|
734
736
|
- [UltracartClient::AddLibraryItemRequest](docs/AddLibraryItemRequest.md)
|
|
735
737
|
- [UltracartClient::AdjustInternalCertificateRequest](docs/AdjustInternalCertificateRequest.md)
|
|
736
738
|
- [UltracartClient::AdjustInternalCertificateResponse](docs/AdjustInternalCertificateResponse.md)
|
|
739
|
+
- [UltracartClient::AdjustLoyaltyPointsRequest](docs/AdjustLoyaltyPointsRequest.md)
|
|
740
|
+
- [UltracartClient::AdjustLoyaltyPointsResponse](docs/AdjustLoyaltyPointsResponse.md)
|
|
737
741
|
- [UltracartClient::Affiliate](docs/Affiliate.md)
|
|
738
742
|
- [UltracartClient::AffiliateAttribute](docs/AffiliateAttribute.md)
|
|
739
743
|
- [UltracartClient::AffiliateClick](docs/AffiliateClick.md)
|
|
@@ -1166,6 +1170,7 @@ Class | Method | HTTP request | Description
|
|
|
1166
1170
|
- [UltracartClient::CustomerLoyalty](docs/CustomerLoyalty.md)
|
|
1167
1171
|
- [UltracartClient::CustomerLoyaltyLedger](docs/CustomerLoyaltyLedger.md)
|
|
1168
1172
|
- [UltracartClient::CustomerLoyaltyRedemption](docs/CustomerLoyaltyRedemption.md)
|
|
1173
|
+
- [UltracartClient::CustomerLoyaltyResponse](docs/CustomerLoyaltyResponse.md)
|
|
1169
1174
|
- [UltracartClient::CustomerMagicLinkResponse](docs/CustomerMagicLinkResponse.md)
|
|
1170
1175
|
- [UltracartClient::CustomerMergeRequest](docs/CustomerMergeRequest.md)
|
|
1171
1176
|
- [UltracartClient::CustomerOrdersSummary](docs/CustomerOrdersSummary.md)
|
|
@@ -1836,6 +1841,8 @@ Not every change is committed to every SDK.
|
|
|
1836
1841
|
|
|
1837
1842
|
| Version | Date | Comments |
|
|
1838
1843
|
| --: | :-: | --- |
|
|
1844
|
+
| 4.1.136 | 08/24/2026 | customer api - adjust method for loyalty points |
|
|
1845
|
+
| 4.1.135 | 08/21/2026 | conversation pbx - support send text operation as a menu item froma different phone number |
|
|
1839
1846
|
| 4.1.134 | 08/21/2026 | conversation - pbx menu mapping for send text |
|
|
1840
1847
|
| 4.1.133 | 08/20/2026 | conversations - pbx agent setting for creating tickets in zoho desk for outgoing calls |
|
|
1841
1848
|
| 4.1.132 | 08/18/2026 | customer activity bug fix |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# UltracartClient::AdjustLoyaltyPointsRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **description** | **String** | Description of this adjustment, 200 characters max | [optional] |
|
|
8
|
+
| **loyalty_points** | **Integer** | The number of loyalty points to add to the ledger. Use a negative number to debit points. Required and may not be zero. | [optional] |
|
|
9
|
+
| **order_id** | **String** | Optional order id if this adjustment is related to a particular order | [optional] |
|
|
10
|
+
| **vesting_days** | **Integer** | Optional days required for this adjustment to vest. Leave null to use the merchant configured default. Use zero for immediate vesting. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'ultracart_api'
|
|
16
|
+
|
|
17
|
+
instance = UltracartClient::AdjustLoyaltyPointsRequest.new(
|
|
18
|
+
description: null,
|
|
19
|
+
loyalty_points: null,
|
|
20
|
+
order_id: null,
|
|
21
|
+
vesting_days: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# UltracartClient::AdjustLoyaltyPointsResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **current_points** | **Integer** | The current (vested) points balance after the adjustment was made | [optional] |
|
|
8
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
|
9
|
+
| **loyalty_points** | **Integer** | The loyalty points adjustment that was written to the ledger | [optional] |
|
|
10
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
|
11
|
+
| **pending_points** | **Integer** | The pending (unvested) points balance after the adjustment was made | [optional] |
|
|
12
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
|
13
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'ultracart_api'
|
|
19
|
+
|
|
20
|
+
instance = UltracartClient::AdjustLoyaltyPointsResponse.new(
|
|
21
|
+
current_points: null,
|
|
22
|
+
error: null,
|
|
23
|
+
loyalty_points: null,
|
|
24
|
+
metadata: null,
|
|
25
|
+
pending_points: null,
|
|
26
|
+
success: null,
|
|
27
|
+
warning: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| **action** | **String** | Action | [optional] |
|
|
8
8
|
| **action_target** | **String** | Action target. This is the UUID associated with the configuration object of that particular type. | [optional] |
|
|
9
9
|
| **digits** | **Integer** | Digits | [optional] |
|
|
10
|
+
| **sms_from_number** | **String** | Optional phone number to send the text message from. Must be a phone number configured on this merchant account and SMS enabled. Defaults to the number the caller dialed. Only used when the action is 'send text'. | [optional] |
|
|
10
11
|
| **speech** | **String** | Speech | [optional] |
|
|
11
12
|
| **text_message** | **String** | Text message body sent to the caller when the action is 'send text'. Ignored for all other actions. | [optional] |
|
|
12
13
|
|
|
@@ -19,6 +20,7 @@ instance = UltracartClient::ConversationPbxMenuMapping.new(
|
|
|
19
20
|
action: null,
|
|
20
21
|
action_target: null,
|
|
21
22
|
digits: null,
|
|
23
|
+
sms_from_number: null,
|
|
22
24
|
speech: null,
|
|
23
25
|
text_message: null
|
|
24
26
|
)
|
data/docs/CustomerApi.md
CHANGED
|
@@ -6,12 +6,14 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
7
|
| [**add_customer_store_credit**](CustomerApi.md#add_customer_store_credit) | **POST** /customer/customers/{customer_profile_oid}/store_credit | Adds store credit to a customer |
|
|
8
8
|
| [**adjust_internal_certificate**](CustomerApi.md#adjust_internal_certificate) | **POST** /customer/customers/{customer_profile_oid}/adjust_cashback_balance | Updates the cashback balance for a customer by updating the internal gift certificate used, creating the gift certificate if needed. |
|
|
9
|
+
| [**adjust_loyalty_points**](CustomerApi.md#adjust_loyalty_points) | **POST** /customer/customers/{customer_profile_oid}/adjust_loyalty_points | Adjusts the loyalty points for a customer by adding a record to the loyalty ledger. |
|
|
9
10
|
| [**delete_customer**](CustomerApi.md#delete_customer) | **DELETE** /customer/customers/{customer_profile_oid} | Delete a customer |
|
|
10
11
|
| [**delete_wish_list_item**](CustomerApi.md#delete_wish_list_item) | **DELETE** /customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid} | Delete a customer wishlist item |
|
|
11
12
|
| [**get_customer**](CustomerApi.md#get_customer) | **GET** /customer/customers/{customer_profile_oid} | Retrieve a customer |
|
|
12
13
|
| [**get_customer_by_email**](CustomerApi.md#get_customer_by_email) | **GET** /customer/customers/by_email/{email} | Retrieve a customer by Email |
|
|
13
14
|
| [**get_customer_editor_values**](CustomerApi.md#get_customer_editor_values) | **GET** /customer/editor_values | Retrieve values needed for a customer profile editor |
|
|
14
15
|
| [**get_customer_email_lists**](CustomerApi.md#get_customer_email_lists) | **GET** /customer/email_lists | Retrieve all email lists across all storefronts |
|
|
16
|
+
| [**get_customer_loyalty**](CustomerApi.md#get_customer_loyalty) | **GET** /customer/customers/{customer_profile_oid}/loyalty | Retrieve the loyalty points, ledger and redemptions for a customer |
|
|
15
17
|
| [**get_customer_store_credit**](CustomerApi.md#get_customer_store_credit) | **GET** /customer/customers/{customer_profile_oid}/store_credit | Retrieve the customer store credit accumulated through loyalty programs |
|
|
16
18
|
| [**get_customer_wish_list**](CustomerApi.md#get_customer_wish_list) | **GET** /customer/customers/{customer_profile_oid}/wishlist | Retrieve wishlist items for customer |
|
|
17
19
|
| [**get_customer_wish_list_item**](CustomerApi.md#get_customer_wish_list_item) | **GET** /customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid} | Retrieve wishlist item for customer |
|
|
@@ -249,6 +251,60 @@ end
|
|
|
249
251
|
- **Accept**: application/json
|
|
250
252
|
|
|
251
253
|
|
|
254
|
+
## adjust_loyalty_points
|
|
255
|
+
|
|
256
|
+
> <AdjustLoyaltyPointsResponse> adjust_loyalty_points(customer_profile_oid, adjust_loyalty_points_request)
|
|
257
|
+
|
|
258
|
+
Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
259
|
+
|
|
260
|
+
Adjusts the loyalty points for a customer by adding a record to the loyalty ledger. The loyalty ledger is append only. Records are never updated or deleted, so a correction is made by posting a second adjustment with the opposite sign.
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
### Examples
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
(No example for this operation).
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
#### Using the adjust_loyalty_points_with_http_info variant
|
|
270
|
+
|
|
271
|
+
This returns an Array which contains the response data, status code and headers.
|
|
272
|
+
|
|
273
|
+
> <Array(<AdjustLoyaltyPointsResponse>, Integer, Hash)> adjust_loyalty_points_with_http_info(customer_profile_oid, adjust_loyalty_points_request)
|
|
274
|
+
|
|
275
|
+
```ruby
|
|
276
|
+
begin
|
|
277
|
+
# Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
278
|
+
data, status_code, headers = api_instance.adjust_loyalty_points_with_http_info(customer_profile_oid, adjust_loyalty_points_request)
|
|
279
|
+
p status_code # => 2xx
|
|
280
|
+
p headers # => { ... }
|
|
281
|
+
p data # => <AdjustLoyaltyPointsResponse>
|
|
282
|
+
rescue UltracartClient::ApiError => e
|
|
283
|
+
puts "Error when calling CustomerApi->adjust_loyalty_points_with_http_info: #{e}"
|
|
284
|
+
end
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Parameters
|
|
288
|
+
|
|
289
|
+
| Name | Type | Description | Notes |
|
|
290
|
+
| ---- | ---- | ----------- | ----- |
|
|
291
|
+
| **customer_profile_oid** | **Integer** | The customer profile oid | |
|
|
292
|
+
| **adjust_loyalty_points_request** | [**AdjustLoyaltyPointsRequest**](AdjustLoyaltyPointsRequest.md) | adjustLoyaltyPointsRequest | |
|
|
293
|
+
|
|
294
|
+
### Return type
|
|
295
|
+
|
|
296
|
+
[**AdjustLoyaltyPointsResponse**](AdjustLoyaltyPointsResponse.md)
|
|
297
|
+
|
|
298
|
+
### Authorization
|
|
299
|
+
|
|
300
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
301
|
+
|
|
302
|
+
### HTTP request headers
|
|
303
|
+
|
|
304
|
+
- **Content-Type**: application/json; charset=UTF-8
|
|
305
|
+
- **Accept**: application/json
|
|
306
|
+
|
|
307
|
+
|
|
252
308
|
## delete_customer
|
|
253
309
|
|
|
254
310
|
> delete_customer(customer_profile_oid)
|
|
@@ -765,6 +821,59 @@ This endpoint does not need any parameter.
|
|
|
765
821
|
- **Accept**: application/json
|
|
766
822
|
|
|
767
823
|
|
|
824
|
+
## get_customer_loyalty
|
|
825
|
+
|
|
826
|
+
> <CustomerLoyaltyResponse> get_customer_loyalty(customer_profile_oid)
|
|
827
|
+
|
|
828
|
+
Retrieve the loyalty points, ledger and redemptions for a customer
|
|
829
|
+
|
|
830
|
+
Retrieve the loyalty points, ledger and redemptions for a customer. This is a convenience method that returns the same information as expanding loyalty on the customer object, without having to retrieve the entire customer.
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
### Examples
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
(No example for this operation).
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
#### Using the get_customer_loyalty_with_http_info variant
|
|
840
|
+
|
|
841
|
+
This returns an Array which contains the response data, status code and headers.
|
|
842
|
+
|
|
843
|
+
> <Array(<CustomerLoyaltyResponse>, Integer, Hash)> get_customer_loyalty_with_http_info(customer_profile_oid)
|
|
844
|
+
|
|
845
|
+
```ruby
|
|
846
|
+
begin
|
|
847
|
+
# Retrieve the loyalty points, ledger and redemptions for a customer
|
|
848
|
+
data, status_code, headers = api_instance.get_customer_loyalty_with_http_info(customer_profile_oid)
|
|
849
|
+
p status_code # => 2xx
|
|
850
|
+
p headers # => { ... }
|
|
851
|
+
p data # => <CustomerLoyaltyResponse>
|
|
852
|
+
rescue UltracartClient::ApiError => e
|
|
853
|
+
puts "Error when calling CustomerApi->get_customer_loyalty_with_http_info: #{e}"
|
|
854
|
+
end
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
### Parameters
|
|
858
|
+
|
|
859
|
+
| Name | Type | Description | Notes |
|
|
860
|
+
| ---- | ---- | ----------- | ----- |
|
|
861
|
+
| **customer_profile_oid** | **Integer** | The customer oid to retrieve. | |
|
|
862
|
+
|
|
863
|
+
### Return type
|
|
864
|
+
|
|
865
|
+
[**CustomerLoyaltyResponse**](CustomerLoyaltyResponse.md)
|
|
866
|
+
|
|
867
|
+
### Authorization
|
|
868
|
+
|
|
869
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
870
|
+
|
|
871
|
+
### HTTP request headers
|
|
872
|
+
|
|
873
|
+
- **Content-Type**: Not defined
|
|
874
|
+
- **Accept**: application/json
|
|
875
|
+
|
|
876
|
+
|
|
768
877
|
## get_customer_store_credit
|
|
769
878
|
|
|
770
879
|
> <CustomerStoreCreditResponse> get_customer_store_credit(customer_profile_oid)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# UltracartClient::CustomerLoyaltyResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **customer_loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | [optional] |
|
|
8
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
|
9
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
|
10
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
|
11
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'ultracart_api'
|
|
17
|
+
|
|
18
|
+
instance = UltracartClient::CustomerLoyaltyResponse.new(
|
|
19
|
+
customer_loyalty: null,
|
|
20
|
+
error: null,
|
|
21
|
+
metadata: null,
|
|
22
|
+
success: null,
|
|
23
|
+
warning: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -182,6 +182,81 @@ module UltracartClient
|
|
|
182
182
|
return data, status_code, headers
|
|
183
183
|
end
|
|
184
184
|
|
|
185
|
+
# Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
186
|
+
# Adjusts the loyalty points for a customer by adding a record to the loyalty ledger. The loyalty ledger is append only. Records are never updated or deleted, so a correction is made by posting a second adjustment with the opposite sign.
|
|
187
|
+
# @param customer_profile_oid [Integer] The customer profile oid
|
|
188
|
+
# @param adjust_loyalty_points_request [AdjustLoyaltyPointsRequest] adjustLoyaltyPointsRequest
|
|
189
|
+
# @param [Hash] opts the optional parameters
|
|
190
|
+
# @return [AdjustLoyaltyPointsResponse]
|
|
191
|
+
def adjust_loyalty_points(customer_profile_oid, adjust_loyalty_points_request, opts = {})
|
|
192
|
+
data, _status_code, _headers = adjust_loyalty_points_with_http_info(customer_profile_oid, adjust_loyalty_points_request, opts)
|
|
193
|
+
data
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Adjusts the loyalty points for a customer by adding a record to the loyalty ledger.
|
|
197
|
+
# Adjusts the loyalty points for a customer by adding a record to the loyalty ledger. The loyalty ledger is append only. Records are never updated or deleted, so a correction is made by posting a second adjustment with the opposite sign.
|
|
198
|
+
# @param customer_profile_oid [Integer] The customer profile oid
|
|
199
|
+
# @param adjust_loyalty_points_request [AdjustLoyaltyPointsRequest] adjustLoyaltyPointsRequest
|
|
200
|
+
# @param [Hash] opts the optional parameters
|
|
201
|
+
# @return [Array<(AdjustLoyaltyPointsResponse, Integer, Hash)>] AdjustLoyaltyPointsResponse data, response status code and response headers
|
|
202
|
+
def adjust_loyalty_points_with_http_info(customer_profile_oid, adjust_loyalty_points_request, opts = {})
|
|
203
|
+
if @api_client.config.debugging
|
|
204
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.adjust_loyalty_points ...'
|
|
205
|
+
end
|
|
206
|
+
# verify the required parameter 'customer_profile_oid' is set
|
|
207
|
+
if @api_client.config.client_side_validation && customer_profile_oid.nil?
|
|
208
|
+
fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.adjust_loyalty_points"
|
|
209
|
+
end
|
|
210
|
+
# verify the required parameter 'adjust_loyalty_points_request' is set
|
|
211
|
+
if @api_client.config.client_side_validation && adjust_loyalty_points_request.nil?
|
|
212
|
+
fail ArgumentError, "Missing the required parameter 'adjust_loyalty_points_request' when calling CustomerApi.adjust_loyalty_points"
|
|
213
|
+
end
|
|
214
|
+
# resource path
|
|
215
|
+
local_var_path = '/customer/customers/{customer_profile_oid}/adjust_loyalty_points'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))
|
|
216
|
+
|
|
217
|
+
# query parameters
|
|
218
|
+
query_params = opts[:query_params] || {}
|
|
219
|
+
|
|
220
|
+
# header parameters
|
|
221
|
+
header_params = opts[:header_params] || {}
|
|
222
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
223
|
+
# HTTP header 'Accept' (if needed)
|
|
224
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
225
|
+
# HTTP header 'Content-Type'
|
|
226
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
227
|
+
if !content_type.nil?
|
|
228
|
+
header_params['Content-Type'] = content_type
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# form parameters
|
|
232
|
+
form_params = opts[:form_params] || {}
|
|
233
|
+
|
|
234
|
+
# http body (model)
|
|
235
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(adjust_loyalty_points_request)
|
|
236
|
+
|
|
237
|
+
# return_type
|
|
238
|
+
return_type = opts[:debug_return_type] || 'AdjustLoyaltyPointsResponse'
|
|
239
|
+
|
|
240
|
+
# auth_names
|
|
241
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
242
|
+
|
|
243
|
+
new_options = opts.merge(
|
|
244
|
+
:operation => :"CustomerApi.adjust_loyalty_points",
|
|
245
|
+
:header_params => header_params,
|
|
246
|
+
:query_params => query_params,
|
|
247
|
+
:form_params => form_params,
|
|
248
|
+
:body => post_body,
|
|
249
|
+
:auth_names => auth_names,
|
|
250
|
+
:return_type => return_type
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
254
|
+
if @api_client.config.debugging
|
|
255
|
+
@api_client.config.logger.debug "API called: CustomerApi#adjust_loyalty_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
256
|
+
end
|
|
257
|
+
return data, status_code, headers
|
|
258
|
+
end
|
|
259
|
+
|
|
185
260
|
# Delete a customer
|
|
186
261
|
# Delete a customer on the UltraCart account.
|
|
187
262
|
# @param customer_profile_oid [Integer] The customer_profile_oid to delete.
|
|
@@ -566,6 +641,70 @@ module UltracartClient
|
|
|
566
641
|
return data, status_code, headers
|
|
567
642
|
end
|
|
568
643
|
|
|
644
|
+
# Retrieve the loyalty points, ledger and redemptions for a customer
|
|
645
|
+
# Retrieve the loyalty points, ledger and redemptions for a customer. This is a convenience method that returns the same information as expanding loyalty on the customer object, without having to retrieve the entire customer.
|
|
646
|
+
# @param customer_profile_oid [Integer] The customer oid to retrieve.
|
|
647
|
+
# @param [Hash] opts the optional parameters
|
|
648
|
+
# @return [CustomerLoyaltyResponse]
|
|
649
|
+
def get_customer_loyalty(customer_profile_oid, opts = {})
|
|
650
|
+
data, _status_code, _headers = get_customer_loyalty_with_http_info(customer_profile_oid, opts)
|
|
651
|
+
data
|
|
652
|
+
end
|
|
653
|
+
|
|
654
|
+
# Retrieve the loyalty points, ledger and redemptions for a customer
|
|
655
|
+
# Retrieve the loyalty points, ledger and redemptions for a customer. This is a convenience method that returns the same information as expanding loyalty on the customer object, without having to retrieve the entire customer.
|
|
656
|
+
# @param customer_profile_oid [Integer] The customer oid to retrieve.
|
|
657
|
+
# @param [Hash] opts the optional parameters
|
|
658
|
+
# @return [Array<(CustomerLoyaltyResponse, Integer, Hash)>] CustomerLoyaltyResponse data, response status code and response headers
|
|
659
|
+
def get_customer_loyalty_with_http_info(customer_profile_oid, opts = {})
|
|
660
|
+
if @api_client.config.debugging
|
|
661
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.get_customer_loyalty ...'
|
|
662
|
+
end
|
|
663
|
+
# verify the required parameter 'customer_profile_oid' is set
|
|
664
|
+
if @api_client.config.client_side_validation && customer_profile_oid.nil?
|
|
665
|
+
fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.get_customer_loyalty"
|
|
666
|
+
end
|
|
667
|
+
# resource path
|
|
668
|
+
local_var_path = '/customer/customers/{customer_profile_oid}/loyalty'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))
|
|
669
|
+
|
|
670
|
+
# query parameters
|
|
671
|
+
query_params = opts[:query_params] || {}
|
|
672
|
+
|
|
673
|
+
# header parameters
|
|
674
|
+
header_params = opts[:header_params] || {}
|
|
675
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
676
|
+
# HTTP header 'Accept' (if needed)
|
|
677
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
678
|
+
|
|
679
|
+
# form parameters
|
|
680
|
+
form_params = opts[:form_params] || {}
|
|
681
|
+
|
|
682
|
+
# http body (model)
|
|
683
|
+
post_body = opts[:debug_body]
|
|
684
|
+
|
|
685
|
+
# return_type
|
|
686
|
+
return_type = opts[:debug_return_type] || 'CustomerLoyaltyResponse'
|
|
687
|
+
|
|
688
|
+
# auth_names
|
|
689
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
690
|
+
|
|
691
|
+
new_options = opts.merge(
|
|
692
|
+
:operation => :"CustomerApi.get_customer_loyalty",
|
|
693
|
+
:header_params => header_params,
|
|
694
|
+
:query_params => query_params,
|
|
695
|
+
:form_params => form_params,
|
|
696
|
+
:body => post_body,
|
|
697
|
+
:auth_names => auth_names,
|
|
698
|
+
:return_type => return_type
|
|
699
|
+
)
|
|
700
|
+
|
|
701
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
702
|
+
if @api_client.config.debugging
|
|
703
|
+
@api_client.config.logger.debug "API called: CustomerApi#get_customer_loyalty\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
704
|
+
end
|
|
705
|
+
return data, status_code, headers
|
|
706
|
+
end
|
|
707
|
+
|
|
569
708
|
# Retrieve the customer store credit accumulated through loyalty programs
|
|
570
709
|
# Retrieve the customer store credit accumulated through loyalty programs
|
|
571
710
|
# @param customer_profile_oid [Integer] The customer oid to retrieve.
|