Skip to content

Commit

Permalink
CustomerApi methods for email verification, favorite flag on ScreenRe…
Browse files Browse the repository at this point in the history
…cording object
  • Loading branch information
perrytew committed Feb 11, 2021
1 parent 44479f0 commit 6f92bbd
Show file tree
Hide file tree
Showing 11 changed files with 2,047 additions and 156 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,11 @@ Class | Method | HTTP request | Description
*CustomerApi* | [**getCustomersForDataTables**](docs/Api/CustomerApi.md#getcustomersfordatatables) | **POST** /customer/customers/dataTables | Retrieve customers for DataTables plugin
*CustomerApi* | [**getEditorValues**](docs/Api/CustomerApi.md#geteditorvalues) | **GET** /customer/editor_values | Retrieve values needed for a customer profile editor
*CustomerApi* | [**getEmailLists**](docs/Api/CustomerApi.md#getemaillists) | **GET** /customer/email_lists | Retrieve all email lists across all storefronts
*CustomerApi* | [**getEmailVerificationToken**](docs/Api/CustomerApi.md#getemailverificationtoken) | **POST** /customer/customers/email_verify/get_token | Create a token that can be used to verify a customer email address
*CustomerApi* | [**insertCustomer**](docs/Api/CustomerApi.md#insertcustomer) | **POST** /customer/customers | Insert a customer
*CustomerApi* | [**updateCustomer**](docs/Api/CustomerApi.md#updatecustomer) | **PUT** /customer/customers/{customer_profile_oid} | Update a customer
*CustomerApi* | [**updateCustomerEmailLists**](docs/Api/CustomerApi.md#updatecustomeremaillists) | **POST** /customer/customers/{customer_profile_oid}/email_lists | Update email list subscriptions for a customer
*CustomerApi* | [**validateEmailVerificationToken**](docs/Api/CustomerApi.md#validateemailverificationtoken) | **POST** /customer/customers/email_verify/validate_token | Validate a token that can be used to verify a customer email address
*FulfillmentApi* | [**acknowledgeOrders**](docs/Api/FulfillmentApi.md#acknowledgeorders) | **PUT** /fulfillment/distribution_centers/{distribution_center_code}/acknowledgements | Acknowledge receipt of orders.
*FulfillmentApi* | [**getDistributionCenterOrders**](docs/Api/FulfillmentApi.md#getdistributioncenterorders) | **GET** /fulfillment/distribution_centers/{distribution_center_code}/orders | Retrieve orders queued up for this distribution center.
*FulfillmentApi* | [**getDistributionCenters**](docs/Api/FulfillmentApi.md#getdistributioncenters) | **GET** /fulfillment/distribution_centers | Retrieve distribution centers
Expand Down Expand Up @@ -738,6 +740,9 @@ Class | Method | HTTP request | Description
- [EmailThirdPartyListImportRequest](docs/Model/EmailThirdPartyListImportRequest.md)
- [EmailThirdPartyProvider](docs/Model/EmailThirdPartyProvider.md)
- [EmailThirdPartyProvidersResponse](docs/Model/EmailThirdPartyProvidersResponse.md)
- [EmailVerifyTokenRequest](docs/Model/EmailVerifyTokenRequest.md)
- [EmailVerifyTokenResponse](docs/Model/EmailVerifyTokenResponse.md)
- [EmailVerifyTokenValidateRequest](docs/Model/EmailVerifyTokenValidateRequest.md)
- [Error](docs/Model/Error.md)
- [ErrorResponse](docs/Model/ErrorResponse.md)
- [Experiment](docs/Model/Experiment.md)
Expand Down Expand Up @@ -1074,6 +1079,9 @@ Not every change is committed to every SDK.

| Version | Date | Comments |
| --: | :-: | --- |
| 3.1.2 | 02/11/2021 | CustomerApi.getEmailVerificationToken, CustomerApi.validateEmailVerificationToken added to allow for custom email verification. Also added favorite flag to screen recording object |
| 3.1.1 | 02/10/2021 | CustomerApi.getCustomerByEmail() method added |
| 3.1.0 | 02/10/2021 | Minor revision jump. Added new convenience methods for simple_key use to all api calls. Updated docs |
| 3.0.75 | 02/01/2021 | StoreFront Communication plan revision (internal use) |
| 3.0.71 | 01/28/2021 | BugFix: PHP SDK retry logic NPE |
| 3.0.70 | 01/26/2021 | Checkout return URL support |
Expand Down
98 changes: 98 additions & 0 deletions docs/Api/CustomerApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ Method | HTTP request | Description
[**getCustomersForDataTables**](CustomerApi.md#getCustomersForDataTables) | **POST** /customer/customers/dataTables | Retrieve customers for DataTables plugin
[**getEditorValues**](CustomerApi.md#getEditorValues) | **GET** /customer/editor_values | Retrieve values needed for a customer profile editor
[**getEmailLists**](CustomerApi.md#getEmailLists) | **GET** /customer/email_lists | Retrieve all email lists across all storefronts
[**getEmailVerificationToken**](CustomerApi.md#getEmailVerificationToken) | **POST** /customer/customers/email_verify/get_token | Create a token that can be used to verify a customer email address
[**insertCustomer**](CustomerApi.md#insertCustomer) | **POST** /customer/customers | Insert a customer
[**updateCustomer**](CustomerApi.md#updateCustomer) | **PUT** /customer/customers/{customer_profile_oid} | Update a customer
[**updateCustomerEmailLists**](CustomerApi.md#updateCustomerEmailLists) | **POST** /customer/customers/{customer_profile_oid}/email_lists | Update email list subscriptions for a customer
[**validateEmailVerificationToken**](CustomerApi.md#validateEmailVerificationToken) | **POST** /customer/customers/email_verify/validate_token | Validate a token that can be used to verify a customer email address


# **deleteCustomer**
Expand Down Expand Up @@ -469,6 +471,54 @@ This endpoint does not need any parameter.

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getEmailVerificationToken**
> \ultracart\v2\models\EmailVerifyTokenResponse getEmailVerificationToken($token_request)
Create a token that can be used to verify a customer email address

Create a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$token_request = new \ultracart\v2\models\EmailVerifyTokenRequest(); // \ultracart\v2\models\EmailVerifyTokenRequest | Token request

try {
$result = $apiInstance->getEmailVerificationToken($token_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CustomerApi->getEmailVerificationToken: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**token_request** | [**\ultracart\v2\models\EmailVerifyTokenRequest**](../Model/EmailVerifyTokenRequest.md)| Token request |

### Return type

[**\ultracart\v2\models\EmailVerifyTokenResponse**](../Model/EmailVerifyTokenResponse.md)

### Authorization

[ultraCartOauth](../../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../../README.md#ultraCartSimpleApiKey)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **insertCustomer**
> \ultracart\v2\models\CustomerResponse insertCustomer($customer, $_expand)
Expand Down Expand Up @@ -621,3 +671,51 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **validateEmailVerificationToken**
> \ultracart\v2\models\EmailVerifyTokenResponse validateEmailVerificationToken($validation_request)
Validate a token that can be used to verify a customer email address

Validate a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
$simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00';
$api_instance = ultracart\v2\api\CustomerApi::usingApiKey($simple_key);

$validation_request = new \ultracart\v2\models\EmailVerifyTokenValidateRequest(); // \ultracart\v2\models\EmailVerifyTokenValidateRequest | Token validation request

try {
$result = $apiInstance->validateEmailVerificationToken($validation_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CustomerApi->validateEmailVerificationToken: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**validation_request** | [**\ultracart\v2\models\EmailVerifyTokenValidateRequest**](../Model/EmailVerifyTokenValidateRequest.md)| Token validation request |

### Return type

[**\ultracart\v2\models\EmailVerifyTokenResponse**](../Model/EmailVerifyTokenResponse.md)

### Authorization

[ultraCartOauth](../../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../../README.md#ultraCartSimpleApiKey)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

11 changes: 11 additions & 0 deletions docs/Model/EmailVerifyTokenRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EmailVerifyTokenRequest

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email** | **string** | email | [optional]
**password** | **string** | password | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


14 changes: 14 additions & 0 deletions docs/Model/EmailVerifyTokenResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# EmailVerifyTokenResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | [**\ultracart\v2\models\Error**](Error.md) | | [optional]
**metadata** | [**\ultracart\v2\models\ResponseMetadata**](ResponseMetadata.md) | | [optional]
**success** | **bool** | Indicates if API call was successful | [optional]
**token** | **string** | token | [optional]
**warning** | [**\ultracart\v2\models\Warning**](Warning.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


10 changes: 10 additions & 0 deletions docs/Model/EmailVerifyTokenValidateRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# EmailVerifyTokenValidateRequest

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **string** | token | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


3 changes: 2 additions & 1 deletion docs/Model/ScreenRecording.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Name | Type | Description | Notes
**esp_customer_uuid** | **string** | | [optional]
**events_gz_size** | **int** | | [optional]
**events_json_key** | **string** | | [optional]
**favorites** | **int[]** | | [optional]
**favorite** | **bool** | True if the user calling the API has favorited this particular screen recording. | [optional]
**favorites** | **int[]** | Array of user ids that favorited this particular screen recording. | [optional]
**geolocation** | [**\ultracart\v2\models\GeoPoint**](GeoPoint.md) | | [optional]
**geolocation_country** | **string** | | [optional]
**geolocation_state** | **string** | | [optional]
Expand Down
Loading

0 comments on commit 6f92bbd

Please sign in to comment.