Skip to content

Feature #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
.openapi-generator-ignore
.travis.yml
README.md
docs/AccesstokenApi.md
docs/AccesstokenResponse.md
docs/AvailabilityAsyncNotificationRequest.md
docs/AvailabilityAsyncNotificationRequestResourceInner.md
docs/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.md
Expand All @@ -27,6 +29,10 @@ docs/FreightResponseFreightEstimateResponse.md
docs/FreightResponseFreightEstimateResponseDistributionInner.md
docs/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.md
docs/FreightResponseFreightEstimateResponseLinesInner.md
docs/GetAccesstoken400Response.md
docs/GetAccesstoken500Response.md
docs/GetAccesstoken500ResponseFault.md
docs/GetAccesstoken500ResponseFaultDetail.md
docs/GetResellerV6ValidateQuote400Response.md
docs/GetResellerV6ValidateQuote400ResponseFieldsInner.md
docs/GetResellerV6ValidateQuote500Response.md
Expand Down Expand Up @@ -202,6 +208,8 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_accesstoken_api.py
test/test_accesstoken_response.py
test/test_availability_async_notification_request.py
test/test_availability_async_notification_request_resource_inner.py
test/test_availability_async_notification_request_resource_inner_links_inner.py
Expand All @@ -225,6 +233,10 @@ test/test_freight_response_freight_estimate_response.py
test/test_freight_response_freight_estimate_response_distribution_inner.py
test/test_freight_response_freight_estimate_response_distribution_inner_carrier_list_inner.py
test/test_freight_response_freight_estimate_response_lines_inner.py
test/test_get_accesstoken400_response.py
test/test_get_accesstoken500_response.py
test/test_get_accesstoken500_response_fault.py
test/test_get_accesstoken500_response_fault_detail.py
test/test_get_reseller_v6_validate_quote400_response.py
test/test_get_reseller_v6_validate_quote400_response_fields_inner.py
test/test_get_reseller_v6_validate_quote500_response.py
Expand Down Expand Up @@ -398,6 +410,7 @@ xi/__init__.py
xi/sdk/__init__.py
xi/sdk/resellers/__init__.py
xi/sdk/resellers/api/__init__.py
xi/sdk/resellers/api/accesstoken_api.py
xi/sdk/resellers/api/deals_api.py
xi/sdk/resellers/api/freight_estimate_api.py
xi/sdk/resellers/api/invoices_api.py
Expand All @@ -414,6 +427,7 @@ xi/sdk/resellers/api_response.py
xi/sdk/resellers/configuration.py
xi/sdk/resellers/exceptions.py
xi/sdk/resellers/models/__init__.py
xi/sdk/resellers/models/accesstoken_response.py
xi/sdk/resellers/models/availability_async_notification_request.py
xi/sdk/resellers/models/availability_async_notification_request_resource_inner.py
xi/sdk/resellers/models/availability_async_notification_request_resource_inner_links_inner.py
Expand All @@ -435,6 +449,10 @@ xi/sdk/resellers/models/freight_response_freight_estimate_response.py
xi/sdk/resellers/models/freight_response_freight_estimate_response_distribution_inner.py
xi/sdk/resellers/models/freight_response_freight_estimate_response_distribution_inner_carrier_list_inner.py
xi/sdk/resellers/models/freight_response_freight_estimate_response_lines_inner.py
xi/sdk/resellers/models/get_accesstoken400_response.py
xi/sdk/resellers/models/get_accesstoken500_response.py
xi/sdk/resellers/models/get_accesstoken500_response_fault.py
xi/sdk/resellers/models/get_accesstoken500_response_fault_detail.py
xi/sdk/resellers/models/get_reseller_v6_validate_quote400_response.py
xi/sdk/resellers/models/get_reseller_v6_validate_quote400_response_fields_inner.py
xi/sdk/resellers/models/get_reseller_v6_validate_quote500_response.py
Expand Down
41 changes: 18 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# xi.sdk.resellers
For Resellers. Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers.

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Expand All @@ -26,6 +21,7 @@ pip install git+https://github.com/ingrammicro-xvantage/xi-sdk-resellers-python.
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/ingrammicro-xvantage/xi-sdk-resellers-python.git`)


Then import the package:
```python
import xi.sdk.resellers
Expand Down Expand Up @@ -65,32 +61,23 @@ configuration = xi.sdk.resellers.Configuration(
host = "https://api.ingrammicro.com:443"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]


# Enter a context with an instance of the API client
with xi.sdk.resellers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = xi.sdk.resellers.DealsApi(api_client)
im_customer_number = '20-222222' # str | Your unique Ingram Micro customer number.
im_country_code = 'US' # str | Two-character ISO country code.
im_correlation_id = 'fbac82ba-cf0a-4bcf-fc03-0c5084' # str | Unique transaction number to identify each transaction across all the systems.
im_application_id = 'MyCompany' # str | Unique value used to identify the sender of the transaction. Example: MyCompany
im_environment = 'prodChicago' # str | Environment name.
deal_id = '12345678' # str | Unique deal ID.
api_instance = xi.sdk.resellers.AccesstokenApi(api_client)
grant_type = 'client_credentials' # str | Keep grant_type as client_credentials only.
client_id = 'client_id_example' # str |
client_secret = 'client_secret_example' # str |

try:
# Deals Details
api_response = api_instance.get_resellers_v6_dealsdetails(im_customer_number, im_country_code, im_correlation_id, im_application_id, im_environment, deal_id)
print("The response of DealsApi->get_resellers_v6_dealsdetails:\n")
# Accesstoken
api_response = api_instance.get_accesstoken(grant_type, client_id, client_secret)
print("The response of AccesstokenApi->get_accesstoken:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DealsApi->get_resellers_v6_dealsdetails: %s\n" % e)
print("Exception when calling AccesstokenApi->get_accesstoken: %s\n" % e)

```

Expand All @@ -100,6 +87,7 @@ All URIs are relative to *https://api.ingrammicro.com:443*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccesstokenApi* | [**get_accesstoken**](docs/AccesstokenApi.md#get_accesstoken) | **GET** /oauth/oauth20/token | Accesstoken
*DealsApi* | [**get_resellers_v6_dealsdetails**](docs/DealsApi.md#get_resellers_v6_dealsdetails) | **GET** /resellers/v6/deals/{dealId} | Deals Details
*DealsApi* | [**get_resellers_v6_dealssearch**](docs/DealsApi.md#get_resellers_v6_dealssearch) | **GET** /resellers/v6/deals/search | Deals Search
*FreightEstimateApi* | [**post_freightestimate**](docs/FreightEstimateApi.md#post_freightestimate) | **POST** /resellers/v6/freightestimate | Freight Estimate
Expand Down Expand Up @@ -128,6 +116,7 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [AccesstokenResponse](docs/AccesstokenResponse.md)
- [AvailabilityAsyncNotificationRequest](docs/AvailabilityAsyncNotificationRequest.md)
- [AvailabilityAsyncNotificationRequestResourceInner](docs/AvailabilityAsyncNotificationRequestResourceInner.md)
- [AvailabilityAsyncNotificationRequestResourceInnerLinksInner](docs/AvailabilityAsyncNotificationRequestResourceInnerLinksInner.md)
Expand All @@ -149,6 +138,10 @@ Class | Method | HTTP request | Description
- [FreightResponseFreightEstimateResponseDistributionInner](docs/FreightResponseFreightEstimateResponseDistributionInner.md)
- [FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner](docs/FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner.md)
- [FreightResponseFreightEstimateResponseLinesInner](docs/FreightResponseFreightEstimateResponseLinesInner.md)
- [GetAccesstoken400Response](docs/GetAccesstoken400Response.md)
- [GetAccesstoken500Response](docs/GetAccesstoken500Response.md)
- [GetAccesstoken500ResponseFault](docs/GetAccesstoken500ResponseFault.md)
- [GetAccesstoken500ResponseFaultDetail](docs/GetAccesstoken500ResponseFaultDetail.md)
- [GetResellerV6ValidateQuote400Response](docs/GetResellerV6ValidateQuote400Response.md)
- [GetResellerV6ValidateQuote400ResponseFieldsInner](docs/GetResellerV6ValidateQuote400ResponseFieldsInner.md)
- [GetResellerV6ValidateQuote500Response](docs/GetResellerV6ValidateQuote500Response.md)
Expand Down Expand Up @@ -324,6 +317,7 @@ Authentication schemes defined for the API:
- **Scopes**:
- **write**: allows modifying resources
- **read**: allows reading resources
- **description**:


## Author
Expand All @@ -333,4 +327,5 @@ Authentication schemes defined for the API:

For any inquiries or support, please feel free to contact us at:

- Email: [xi_support@ingrammicro.com](xi_support@ingrammicro.com)
- Email: [xi_support@ingrammicro.com](xi_support@ingrammicro.com)

83 changes: 83 additions & 0 deletions docs/AccesstokenApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# xi.sdk.resellers.AccesstokenApi

All URIs are relative to *https://api.ingrammicro.com:443*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_accesstoken**](AccesstokenApi.md#get_accesstoken) | **GET** /oauth/oauth20/token | Accesstoken


# **get_accesstoken**
> AccesstokenResponse get_accesstoken(grant_type, client_id, client_secret)

Accesstoken

The Authentication endpoint will provide an access token to access the API.

### Example


```python
import xi.sdk.resellers
from xi.sdk.resellers.models.accesstoken_response import AccesstokenResponse
from xi.sdk.resellers.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.ingrammicro.com:443
# See configuration.py for a list of all supported configuration parameters.
configuration = xi.sdk.resellers.Configuration(
host = "https://api.ingrammicro.com:443"
)


# Enter a context with an instance of the API client
with xi.sdk.resellers.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = xi.sdk.resellers.AccesstokenApi(api_client)
grant_type = 'client_credentials' # str | Keep grant_type as client_credentials only.
client_id = 'client_id_example' # str |
client_secret = 'client_secret_example' # str |

try:
# Accesstoken
api_response = api_instance.get_accesstoken(grant_type, client_id, client_secret)
print("The response of AccesstokenApi->get_accesstoken:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccesstokenApi->get_accesstoken: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**grant_type** | **str**| Keep grant_type as client_credentials only. |
**client_id** | **str**| |
**client_secret** | **str**| |

### Return type

[**AccesstokenResponse**](AccesstokenResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**500** | Internal Server Error | - |

[[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)

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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**access_token** | **str** | | [optional]
**token_type** | **str** | | [optional]
**expires_in** | **str** | | [optional]

## Example

```python
from xi.sdk.resellers.models.accesstoken_response import AccesstokenResponse

# TODO update the JSON string below
json = "{}"
# create an instance of AccesstokenResponse from a JSON string
accesstoken_response_instance = AccesstokenResponse.from_json(json)
# print the JSON string representation of the object
print AccesstokenResponse.to_json()

# convert the object into a dict
accesstoken_response_dict = accesstoken_response_instance.to_dict()
# create an instance of AccesstokenResponse from a dict
accesstoken_response_form_dict = accesstoken_response.from_dict(accesstoken_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **str** | | [optional]

## Example

```python
from xi.sdk.resellers.models.get_accesstoken400_response import GetAccesstoken400Response

# TODO update the JSON string below
json = "{}"
# create an instance of GetAccesstoken400Response from a JSON string
get_accesstoken400_response_instance = GetAccesstoken400Response.from_json(json)
# print the JSON string representation of the object
print GetAccesstoken400Response.to_json()

# convert the object into a dict
get_accesstoken400_response_dict = get_accesstoken400_response_instance.to_dict()
# create an instance of GetAccesstoken400Response from a dict
get_accesstoken400_response_form_dict = get_accesstoken400_response.from_dict(get_accesstoken400_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**fault** | [**GetAccesstoken500ResponseFault**](GetAccesstoken500ResponseFault.md) | | [optional]

## Example

```python
from xi.sdk.resellers.models.get_accesstoken500_response import GetAccesstoken500Response

# TODO update the JSON string below
json = "{}"
# create an instance of GetAccesstoken500Response from a JSON string
get_accesstoken500_response_instance = GetAccesstoken500Response.from_json(json)
# print the JSON string representation of the object
print GetAccesstoken500Response.to_json()

# convert the object into a dict
get_accesstoken500_response_dict = get_accesstoken500_response_instance.to_dict()
# create an instance of GetAccesstoken500Response from a dict
get_accesstoken500_response_form_dict = get_accesstoken500_response.from_dict(get_accesstoken500_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


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


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**faultstring** | **str** | | [optional]
**detail** | [**GetAccesstoken500ResponseFaultDetail**](GetAccesstoken500ResponseFaultDetail.md) | | [optional]

## Example

```python
from xi.sdk.resellers.models.get_accesstoken500_response_fault import GetAccesstoken500ResponseFault

# TODO update the JSON string below
json = "{}"
# create an instance of GetAccesstoken500ResponseFault from a JSON string
get_accesstoken500_response_fault_instance = GetAccesstoken500ResponseFault.from_json(json)
# print the JSON string representation of the object
print GetAccesstoken500ResponseFault.to_json()

# convert the object into a dict
get_accesstoken500_response_fault_dict = get_accesstoken500_response_fault_instance.to_dict()
# create an instance of GetAccesstoken500ResponseFault from a dict
get_accesstoken500_response_fault_form_dict = get_accesstoken500_response_fault.from_dict(get_accesstoken500_response_fault_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading