Skip to content

Commit

Permalink
breaking changes version 2.0.0
Browse files Browse the repository at this point in the history
- searchOn and sortBy now accept a comma delimited string instead of a comma delimited string OR an array of strings
- Rename "Update" (used for PUT's) in favor of "Save" to clarify intent.  It should more often be used to create new things. If you want to update an object a Patch is most likely the best thing to use.
  • Loading branch information
Crhistian Ramirez committed Apr 19, 2018
1 parent 8bd4f1e commit 430ee44
Show file tree
Hide file tree
Showing 288 changed files with 13,213 additions and 2,933 deletions.
112 changes: 75 additions & 37 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ordercloud-javascript-sdk",
"version": "1.0.59",
"version": "2.0.0",
"description": "JavaScript SDK autogenerated from swagger spec using the Swagger-CodeGen project",
"main": "dist/ordercloud-javascript-sdk.js",
"authors": [
Expand Down
1 change: 1 addition & 0 deletions docs/Address.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ID** | **String** | | [optional]
**dateCreated** | **String** | | [optional]
**companyName** | **String** | | [optional]
**firstName** | **String** | | [optional]
**lastName** | **String** | | [optional]
Expand Down
92 changes: 46 additions & 46 deletions docs/Addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Method | HTTP request | Description
[**List**](Addresses.md#List) | **GET** /buyers/{buyerID}/addresses |
[**ListAssignments**](Addresses.md#ListAssignments) | **GET** /buyers/{buyerID}/addresses/assignments |
[**Patch**](Addresses.md#Patch) | **PATCH** /buyers/{buyerID}/addresses/{addressID} |
[**Save**](Addresses.md#Save) | **PUT** /buyers/{buyerID}/addresses/{addressID} |
[**SaveAssignment**](Addresses.md#SaveAssignment) | **POST** /buyers/{buyerID}/addresses/assignments |
[**Update**](Addresses.md#Update) | **PUT** /buyers/{buyerID}/addresses/{addressID} |


<a name="Create"></a>
Expand Down Expand Up @@ -245,12 +245,12 @@ var apiInstance = new OrderCloud.Addresses();
var buyerID = "buyerID_example"; // String | ID of the buyer.

var opts = {
'search': "search_example", // String | Search of the address.
'searchOn': ["searchOn_example"], // [String] | Search on of the address.
'sortBy': ["sortBy_example"], // [String] | Sort by of the address.
'page': 56, // Number | Page of the address.
'pageSize': 56, // Number | Page size of the address.
'filters': {key: "filters_example"} // {String: String} | Filters of the address.
'search': "search_example", // String | Word or phrase to search for.
'searchOn': "searchOn_example", // String | Comma-delimited list of fields to search on.
'sortBy': "sortBy_example", // String | Comma-delimited list of fields to sort by.
'page': 56, // Number | Page of results to return. Default: 1
'pageSize': 56, // Number | Number of results to return per page. Default: 20, max: 100.
'filters': {key: "filters_example"} // {String: String} | Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
};
apiInstance.List(buyerID, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
Expand All @@ -265,12 +265,12 @@ apiInstance.List(buyerID, opts).then(function(data) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**buyerID** | **String**| ID of the buyer. |
**search** | **String**| Search of the address. | [optional]
**searchOn** | [**[String]**](String.md)| Search on of the address. | [optional]
**sortBy** | [**[String]**](String.md)| Sort by of the address. | [optional]
**page** | **Number**| Page of the address. | [optional]
**pageSize** | **Number**| Page size of the address. | [optional]
**filters** | [**{String: String}**](String.md)| Filters of the address. | [optional]
**search** | **String**| Word or phrase to search for. | [optional]
**searchOn** | **String**| Comma-delimited list of fields to search on. | [optional]
**sortBy** | **String**| Comma-delimited list of fields to sort by. | [optional]
**page** | **Number**| Page of results to return. Default: 1 | [optional]
**pageSize** | **Number**| Number of results to return per page. Default: 20, max: 100. | [optional]
**filters** | [**{String: String}**](String.md)| Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39; | [optional]

### Return type

Expand Down Expand Up @@ -310,11 +310,11 @@ var opts = {
'addressID': "addressID_example", // String | ID of the address.
'userID': "userID_example", // String | ID of the user.
'userGroupID': "userGroupID_example", // String | ID of the user group.
'level': "level_example", // String | Level of the address.
'isShipping': true, // Boolean | Is shipping of the address.
'isBilling': true, // Boolean | Is billing of the address.
'page': 56, // Number | Page of the address.
'pageSize': 56 // Number | Page size of the address.
'level': "level_example", // String | Level of the address assignment. Possible values: User, Group, Company.
'isShipping': true, // Boolean | Is shipping of the address assignment.
'isBilling': true, // Boolean | Is billing of the address assignment.
'page': 56, // Number | Page of results to return. Default: 1
'pageSize': 56 // Number | Number of results to return per page. Default: 20, max: 100.
};
apiInstance.ListAssignments(buyerID, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
Expand All @@ -332,11 +332,11 @@ Name | Type | Description | Notes
**addressID** | **String**| ID of the address. | [optional]
**userID** | **String**| ID of the user. | [optional]
**userGroupID** | **String**| ID of the user group. | [optional]
**level** | **String**| Level of the address. | [optional]
**isShipping** | **Boolean**| Is shipping of the address. | [optional]
**isBilling** | **Boolean**| Is billing of the address. | [optional]
**page** | **Number**| Page of the address. | [optional]
**pageSize** | **Number**| Page size of the address. | [optional]
**level** | **String**| Level of the address assignment. Possible values: User, Group, Company. | [optional]
**isShipping** | **Boolean**| Is shipping of the address assignment. | [optional]
**isBilling** | **Boolean**| Is billing of the address assignment. | [optional]
**page** | **Number**| Page of results to return. Default: 1 | [optional]
**pageSize** | **Number**| Number of results to return per page. Default: 20, max: 100. | [optional]

### Return type

Expand All @@ -355,7 +355,7 @@ Name | Type | Description | Notes

<a name="Patch"></a>
# **Patch**
> Address Patch(buyerID, addressID, address)
> Address Patch(buyerID, addressID, partialAddress)


Expand All @@ -374,9 +374,9 @@ var buyerID = "buyerID_example"; // String | ID of the buyer.

var addressID = "addressID_example"; // String | ID of the address.

var address = new OrderCloud.Address(); // Address |
var partialAddress = new OrderCloud.Address(); // Address |

apiInstance.Patch(buyerID, addressID, address).then(function(data) {
apiInstance.Patch(buyerID, addressID, partialAddress).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
Expand All @@ -390,7 +390,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**buyerID** | **String**| ID of the buyer. |
**addressID** | **String**| ID of the address. |
**address** | [**Address**](Address.md)| |
**partialAddress** | [**Address**](Address.md)| |

### Return type

Expand All @@ -407,9 +407,9 @@ Name | Type | Description | Notes
- **Content-Type**: application/json, text/plain; charset=utf-8
- **Accept**: application/json

<a name="SaveAssignment"></a>
# **SaveAssignment**
> SaveAssignment(buyerID, assignment)
<a name="Save"></a>
# **Save**
> Address Save(buyerID, addressID, address)


Expand All @@ -426,10 +426,12 @@ var apiInstance = new OrderCloud.Addresses();

var buyerID = "buyerID_example"; // String | ID of the buyer.

var assignment = new OrderCloud.AddressAssignment(); // AddressAssignment |
var addressID = "addressID_example"; // String | ID of the address.

apiInstance.SaveAssignment(buyerID, assignment).then(function() {
console.log('API called successfully.');
var address = new OrderCloud.Address(); // Address |

apiInstance.Save(buyerID, addressID, address).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Expand All @@ -441,11 +443,12 @@ apiInstance.SaveAssignment(buyerID, assignment).then(function() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**buyerID** | **String**| ID of the buyer. |
**assignment** | [**AddressAssignment**](AddressAssignment.md)| |
**addressID** | **String**| ID of the address. |
**address** | [**Address**](Address.md)| |

### Return type

null (empty response body)
[**Address**](Address.md)

### Authorization

Expand All @@ -458,9 +461,9 @@ null (empty response body)
- **Content-Type**: application/json, text/plain; charset=utf-8
- **Accept**: application/json

<a name="Update"></a>
# **Update**
> Address Update(buyerID, addressID, address)
<a name="SaveAssignment"></a>
# **SaveAssignment**
> SaveAssignment(buyerID, addressAssignment)


Expand All @@ -477,12 +480,10 @@ var apiInstance = new OrderCloud.Addresses();

var buyerID = "buyerID_example"; // String | ID of the buyer.

var addressID = "addressID_example"; // String | ID of the address.

var address = new OrderCloud.Address(); // Address |
var addressAssignment = new OrderCloud.AddressAssignment(); // AddressAssignment |

apiInstance.Update(buyerID, addressID, address).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
apiInstance.SaveAssignment(buyerID, addressAssignment).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Expand All @@ -494,12 +495,11 @@ apiInstance.Update(buyerID, addressID, address).then(function(data) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**buyerID** | **String**| ID of the buyer. |
**addressID** | **String**| ID of the address. |
**address** | [**Address**](Address.md)| |
**addressAssignment** | [**AddressAssignment**](AddressAssignment.md)| |

### Return type

[**Address**](Address.md)
null (empty response body)

### Authorization

Expand Down
42 changes: 21 additions & 21 deletions docs/AdminAddresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Method | HTTP request | Description
[**Get**](AdminAddresses.md#Get) | **GET** /addresses/{addressID} |
[**List**](AdminAddresses.md#List) | **GET** /addresses |
[**Patch**](AdminAddresses.md#Patch) | **PATCH** /addresses/{addressID} |
[**Update**](AdminAddresses.md#Update) | **PUT** /addresses/{addressID} |
[**Save**](AdminAddresses.md#Save) | **PUT** /addresses/{addressID} |


<a name="Create"></a>
Expand Down Expand Up @@ -174,12 +174,12 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OrderCloud.AdminAddresses();

var opts = {
'search': "search_example", // String | Search of the admin address.
'searchOn': ["searchOn_example"], // [String] | Search on of the admin address.
'sortBy': ["sortBy_example"], // [String] | Sort by of the admin address.
'page': 56, // Number | Page of the admin address.
'pageSize': 56, // Number | Page size of the admin address.
'filters': {key: "filters_example"} // {String: String} | Filters of the admin address.
'search': "search_example", // String | Word or phrase to search for.
'searchOn': "searchOn_example", // String | Comma-delimited list of fields to search on.
'sortBy': "sortBy_example", // String | Comma-delimited list of fields to sort by.
'page': 56, // Number | Page of results to return. Default: 1
'pageSize': 56, // Number | Number of results to return per page. Default: 20, max: 100.
'filters': {key: "filters_example"} // {String: String} | Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
};
apiInstance.List(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
Expand All @@ -193,12 +193,12 @@ apiInstance.List(opts).then(function(data) {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**search** | **String**| Search of the admin address. | [optional]
**searchOn** | [**[String]**](String.md)| Search on of the admin address. | [optional]
**sortBy** | [**[String]**](String.md)| Sort by of the admin address. | [optional]
**page** | **Number**| Page of the admin address. | [optional]
**pageSize** | **Number**| Page size of the admin address. | [optional]
**filters** | [**{String: String}**](String.md)| Filters of the admin address. | [optional]
**search** | **String**| Word or phrase to search for. | [optional]
**searchOn** | **String**| Comma-delimited list of fields to search on. | [optional]
**sortBy** | **String**| Comma-delimited list of fields to sort by. | [optional]
**page** | **Number**| Page of results to return. Default: 1 | [optional]
**pageSize** | **Number**| Number of results to return per page. Default: 20, max: 100. | [optional]
**filters** | [**{String: String}**](String.md)| Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39; | [optional]

### Return type

Expand All @@ -217,7 +217,7 @@ Name | Type | Description | Notes

<a name="Patch"></a>
# **Patch**
> Address Patch(addressID, address)
> Address Patch(addressID, partialAddress)


Expand All @@ -234,9 +234,9 @@ var apiInstance = new OrderCloud.AdminAddresses();

var addressID = "addressID_example"; // String | ID of the address.

var address = new OrderCloud.Address(); // Address |
var partialAddress = new OrderCloud.Address(); // Address |

apiInstance.Patch(addressID, address).then(function(data) {
apiInstance.Patch(addressID, partialAddress).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
Expand All @@ -249,7 +249,7 @@ apiInstance.Patch(addressID, address).then(function(data) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**addressID** | **String**| ID of the address. |
**address** | [**Address**](Address.md)| |
**partialAddress** | [**Address**](Address.md)| |

### Return type

Expand All @@ -266,9 +266,9 @@ Name | Type | Description | Notes
- **Content-Type**: application/json, text/plain; charset=utf-8
- **Accept**: application/json

<a name="Update"></a>
# **Update**
> Address Update(addressID, address)
<a name="Save"></a>
# **Save**
> Address Save(addressID, address)


Expand All @@ -287,7 +287,7 @@ var addressID = "addressID_example"; // String | ID of the address.

var address = new OrderCloud.Address(); // Address |

apiInstance.Update(addressID, address).then(function(data) {
apiInstance.Save(addressID, address).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
Expand Down
Loading

0 comments on commit 430ee44

Please sign in to comment.