Skip to content

Commit

Permalink
Bugfix: PHP SDK Retry logic NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
perrytew committed Feb 1, 2021
1 parent c2436cd commit 329e45c
Show file tree
Hide file tree
Showing 113 changed files with 15,079 additions and 298 deletions.
90 changes: 86 additions & 4 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/AddLibraryItemRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**attributes** | [**Array<LibraryItemAttribute>**](LibraryItemAttribute.md) | Attributes associated with the library item to contain additional configuration. | [optional]
**cjson** | **String** | Cjson to be added to library | [optional]
**content_type** | **String** | flow, campaign, cjson, email, transactional_email or upsell | [optional]
**description** | **String** | description of library item | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/ApplyLibraryItemResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**attributes** | [**Array<LibraryItemAttribute>**](LibraryItemAttribute.md) | Attributes from the library item | [optional]
**cjson** | **String** | Cjson from library item, only populated if this library item was a cjson snippet or marketing email (not transactional) | [optional]
**content_type** | **String** | flow, campaign, cjson, upsell, transactional_email or email | [optional]
**email_template_vm_path** | **String** | If a marketing email was applied, this is the path to the template encapsulating the cjson. This is needed for the UltraCart UI. | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/CartCheckout.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Name | Type | Description | Notes
**custom_field7** | **String** | Custom field 7 | [optional]
**ip_address** | **String** | IP Address (read only unless non-browser key authenticated) | [optional]
**return_code** | **String** | Return code assigned for send return email operation | [optional]
**return_url** | **String** | The URL to redirect the customer to when they return from an abandon cart email. Must be https protocol. | [optional]
**screen_branding_theme_code** | **String** | Screen branding theme code | [optional]
**storefront_host_name** | **String** | StoreFront Host Name | [optional]
**user_agent** | **String** | User agent of the browser | [optional]
Expand Down
66 changes: 66 additions & 0 deletions docs/CheckoutApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Method | HTTP request | Description
[**get_cart**](CheckoutApi.md#get_cart) | **GET** /checkout/cart | Get cart
[**get_cart_by_cart_id**](CheckoutApi.md#get_cart_by_cart_id) | **GET** /checkout/cart/{cart_id} | Get cart (by cart id)
[**get_cart_by_return_code**](CheckoutApi.md#get_cart_by_return_code) | **GET** /checkout/return/{return_code} | Get cart (by return code)
[**get_cart_by_return_token**](CheckoutApi.md#get_cart_by_return_token) | **GET** /checkout/return_token | Get cart (by return token)
[**get_state_provinces_for_country**](CheckoutApi.md#get_state_provinces_for_country) | **POST** /checkout/stateProvincesForCountry/{country_code} | Get state/province list for a country code
[**handoff_cart**](CheckoutApi.md#handoff_cart) | **POST** /checkout/cart/handoff | Handoff cart
[**login**](CheckoutApi.md#login) | **POST** /checkout/cart/profile/login | Profile login
Expand Down Expand Up @@ -456,6 +457,71 @@ Name | Type | Description | Notes



# **get_cart_by_return_token**
> CartResponse get_cart_by_return_token(opts)
Get cart (by return token)

Get a cart specified by the encrypted return token parameter.

### Example
```ruby
# load the gem
require 'com_ultracart_admin_v2'
# setup authorization
UltraCartAdminV2.configure do |config|
# Configure API key authorization: ultraCartBrowserApiKey
config.api_key['x-ultracart-browser-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['x-ultracart-browser-key'] = 'Bearer'

# Configure OAuth2 access token for authorization: ultraCartOauth
config.access_token = 'YOUR ACCESS TOKEN'

# Configure API key authorization: ultraCartSimpleApiKey
config.api_key['x-ultracart-simple-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['x-ultracart-simple-key'] = 'Bearer'
end

api_instance = UltraCartAdminV2::CheckoutApi.new

opts = {
return_token: 'return_token_example', # String | Return token provided by StoreFront Communications
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
}

begin
#Get cart (by return token)
result = api_instance.get_cart_by_return_token(opts)
p result
rescue UltraCartAdminV2::ApiError => e
puts "Exception when calling CheckoutApi->get_cart_by_return_token: #{e}"
end
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**return_token** | **String**| Return token provided by StoreFront Communications | [optional]
**_expand** | **String**| The object expansion to perform on the result. See documentation for examples | [optional]

### Return type

[**CartResponse**](CartResponse.md)

### Authorization

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

### HTTP request headers

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



# **get_state_provinces_for_country**
> CheckoutStateProvinceResponse get_state_provinces_for_country(country_code)
Expand Down
188 changes: 188 additions & 0 deletions docs/CouponApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Method | HTTP request | Description
[**delete_coupon**](CouponApi.md#delete_coupon) | **DELETE** /coupon/coupons/{coupon_oid} | Delete a coupon
[**delete_coupons_by_code**](CouponApi.md#delete_coupons_by_code) | **DELETE** /coupon/coupons/by_code | Deletes multiple coupons
[**delete_coupons_by_oid**](CouponApi.md#delete_coupons_by_oid) | **DELETE** /coupon/coupons/by_oid | Deletes multiple coupons
[**does_coupon_code_exist**](CouponApi.md#does_coupon_code_exist) | **GET** /coupon/coupons/merchant_code/{merchant_code}/exists | Determines if a coupon merchant code already exists
[**generate_coupon_codes**](CouponApi.md#generate_coupon_codes) | **POST** /coupon/coupons/{coupon_oid}/generate_codes | Generates one time codes for a coupon
[**generate_one_time_codes_by_merchant_code**](CouponApi.md#generate_one_time_codes_by_merchant_code) | **POST** /coupon/coupons/merchant_code/{merchant_code}/generate_codes | Generates one time codes by merchant code
[**get_auto_apply**](CouponApi.md#get_auto_apply) | **GET** /coupon/auto_apply | Retrieve auto apply rules and conditions
Expand All @@ -16,9 +17,11 @@ Method | HTTP request | Description
[**get_coupons_by_query**](CouponApi.md#get_coupons_by_query) | **GET** /coupon/coupons/query | Retrieve coupons by query
[**get_editor_values**](CouponApi.md#get_editor_values) | **GET** /coupon/editor_values | Retrieve values needed for a coupon editor
[**insert_coupon**](CouponApi.md#insert_coupon) | **POST** /coupon/coupons | Insert a coupon
[**insert_coupons**](CouponApi.md#insert_coupons) | **POST** /coupon/coupons/batch | Insert multiple coupons
[**search_items**](CouponApi.md#search_items) | **GET** /coupon/searchItems | Searches for items to display within a coupon editor and assign to coupons
[**update_auto_apply**](CouponApi.md#update_auto_apply) | **POST** /coupon/auto_apply | Update auto apply rules and conditions
[**update_coupon**](CouponApi.md#update_coupon) | **PUT** /coupon/coupons/{coupon_oid} | Update a coupon
[**update_coupons**](CouponApi.md#update_coupons) | **PUT** /coupon/coupons/batch | Update multiple coupons
[**upload_coupon_codes**](CouponApi.md#upload_coupon_codes) | **POST** /coupon/coupons/{coupon_oid}/upload_codes | Upload one-time codes for a coupon


Expand Down Expand Up @@ -190,6 +193,63 @@ nil (empty response body)



# **does_coupon_code_exist**
> CouponExistsResponse does_coupon_code_exist(merchant_code)
Determines if a coupon merchant code already exists

Determines if a coupon merchant code already exists.

### Example
```ruby
# load the gem
require 'com_ultracart_admin_v2'
# setup authorization
UltraCartAdminV2.configure do |config|
# Configure OAuth2 access token for authorization: ultraCartOauth
config.access_token = 'YOUR ACCESS TOKEN'

# Configure API key authorization: ultraCartSimpleApiKey
config.api_key['x-ultracart-simple-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['x-ultracart-simple-key'] = 'Bearer'
end

api_instance = UltraCartAdminV2::CouponApi.new

merchant_code = 'merchant_code_example' # String | The coupon merchant code to examine.


begin
#Determines if a coupon merchant code already exists
result = api_instance.does_coupon_code_exist(merchant_code)
p result
rescue UltraCartAdminV2::ApiError => e
puts "Exception when calling CouponApi->does_coupon_code_exist: #{e}"
end
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**merchant_code** | **String**| The coupon merchant code to examine. |

### Return type

[**CouponExistsResponse**](CouponExistsResponse.md)

### Authorization

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

### HTTP request headers

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



# **generate_coupon_codes**
> CouponCodesResponse generate_coupon_codes(coupon_oid, coupon_codes_request)
Expand Down Expand Up @@ -744,6 +804,69 @@ Name | Type | Description | Notes



# **insert_coupons**
> CouponsResponse insert_coupons(coupons_request, opts)
Insert multiple coupons

Insert multiple coupon on the UltraCart account.

### Example
```ruby
# load the gem
require 'com_ultracart_admin_v2'
# setup authorization
UltraCartAdminV2.configure do |config|
# Configure OAuth2 access token for authorization: ultraCartOauth
config.access_token = 'YOUR ACCESS TOKEN'

# Configure API key authorization: ultraCartSimpleApiKey
config.api_key['x-ultracart-simple-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['x-ultracart-simple-key'] = 'Bearer'
end

api_instance = UltraCartAdminV2::CouponApi.new

coupons_request = UltraCartAdminV2::CouponsRequest.new # CouponsRequest | Coupons to insert (maximum 20)

opts = {
_expand: '_expand_example', # String | The object expansion to perform on the result. See documentation for examples
_placeholders: true # BOOLEAN | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
}

begin
#Insert multiple coupons
result = api_instance.insert_coupons(coupons_request, opts)
p result
rescue UltraCartAdminV2::ApiError => e
puts "Exception when calling CouponApi->insert_coupons: #{e}"
end
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**coupons_request** | [**CouponsRequest**](CouponsRequest.md)| Coupons to insert (maximum 20) |
**_expand** | **String**| The object expansion to perform on the result. See documentation for examples | [optional]
**_placeholders** | **BOOLEAN**| Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional]

### Return type

[**CouponsResponse**](CouponsResponse.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: application/json; charset=UTF-8
- **Accept**: application/json



# **search_items**
> CouponItemSearchResultsResponse search_items(opts)
Expand Down Expand Up @@ -924,6 +1047,71 @@ Name | Type | Description | Notes



# **update_coupons**
> CouponsResponse update_coupons(coupons_request, opts)
Update multiple coupons

Update multiple coupon on the UltraCart account.

### Example
```ruby
# load the gem
require 'com_ultracart_admin_v2'
# setup authorization
UltraCartAdminV2.configure do |config|
# Configure OAuth2 access token for authorization: ultraCartOauth
config.access_token = 'YOUR ACCESS TOKEN'

# Configure API key authorization: ultraCartSimpleApiKey
config.api_key['x-ultracart-simple-key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['x-ultracart-simple-key'] = 'Bearer'
end

api_instance = UltraCartAdminV2::CouponApi.new

coupons_request = UltraCartAdminV2::CouponsRequest.new # CouponsRequest | Coupons to update (synchronous maximum 20 / asynchronous maximum 100)

opts = {
_expand: '_expand_example', # String | The object expansion to perform on the result. See documentation for examples
_placeholders: true, # BOOLEAN | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
_async: true # BOOLEAN | True if the operation should be run async. No result returned
}

begin
#Update multiple coupons
result = api_instance.update_coupons(coupons_request, opts)
p result
rescue UltraCartAdminV2::ApiError => e
puts "Exception when calling CouponApi->update_coupons: #{e}"
end
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**coupons_request** | [**CouponsRequest**](CouponsRequest.md)| Coupons to update (synchronous maximum 20 / asynchronous maximum 100) |
**_expand** | **String**| The object expansion to perform on the result. See documentation for examples | [optional]
**_placeholders** | **BOOLEAN**| Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional]
**_async** | **BOOLEAN**| True if the operation should be run async. No result returned | [optional]

### Return type

[**CouponsResponse**](CouponsResponse.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: application/json; charset=UTF-8
- **Accept**: application/json



# **upload_coupon_codes**
> UploadCouponCodesResponse upload_coupon_codes(coupon_oid, upload_coupon_codes_request)
Expand Down
13 changes: 13 additions & 0 deletions docs/CouponExistsResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# UltraCartAdminV2::CouponExistsResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**coupon_code** | **String** | Coupon Code | [optional]
**error** | [**Error**](Error.md) | | [optional]
**exists** | **BOOLEAN** | Exists | [optional]
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
**warning** | [**Warning**](Warning.md) | | [optional]


8 changes: 8 additions & 0 deletions docs/CouponsRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# UltraCartAdminV2::CouponsRequest

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**coupons** | [**Array<Coupon>**](Coupon.md) | coupons | [optional]


2 changes: 2 additions & 0 deletions docs/EmailCampaign.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**email_campaign_uuid** | **String** | Email campaign UUID | [optional]
**email_communication_sequence_uuid** | **String** | Email communication sequence UUID | [optional]
**end_once_customer_purchases** | **BOOLEAN** | True if the customer should end the flow once they purchase | [optional]
**esp_campaign_folder_uuid** | **String** | Campaign folder UUID. Null for uncategorized | [optional]
**esp_domain_user** | **String** | User of the sending address | [optional]
**esp_domain_uuid** | **String** | UUID of the sending domain | [optional]
**esp_friendly_name** | **String** | Friendly name of the sending email | [optional]
Expand All @@ -19,6 +20,7 @@ Name | Type | Description | Notes
**open_rate_formatted** | **String** | Open rate of emails | [optional]
**prevent_sending_due_to_spam** | **BOOLEAN** | True if this campaign is prevented from sending at this time due to spam complaints. | [optional]
**revenue_formatted** | **String** | Revenue associated with campaign | [optional]
**revenue_per_customer_formatted** | **String** | Revenue per customer associated with campaign | [optional]
**scheduled_dts** | **String** | Scheduled date | [optional]
**screenshot_large_full_url** | **String** | URL to a large full length screenshot | [optional]
**status** | **String** | Status of the campaign of draft, archived, and sent | [optional]
Expand Down
12 changes: 12 additions & 0 deletions docs/EmailCampaignFolder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# UltraCartAdminV2::EmailCampaignFolder

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**esp_campaign_folder_uuid** | **String** | Email campaign folder UUID | [optional]
**merchant_id** | **String** | Merchant ID | [optional]
**name** | **String** | Name of email campaign folder | [optional]
**storefront_oid** | **Integer** | Storefront oid | [optional]
**system_generated** | **BOOLEAN** | System generated folder | [optional]


12 changes: 12 additions & 0 deletions docs/EmailCampaignFolderResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# UltraCartAdminV2::EmailCampaignFolderResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**campaign_folder** | [**EmailCampaignFolder**](EmailCampaignFolder.md) | | [optional]
**error** | [**Error**](Error.md) | | [optional]
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
**warning** | [**Warning**](Warning.md) | | [optional]


0 comments on commit 329e45c

Please sign in to comment.