Skip to content

Latest commit

 

History

History
194 lines (135 loc) · 7.28 KB

ObjectCustomerApi.md

File metadata and controls

194 lines (135 loc) · 7.28 KB

ObjectCustomerApi

All URIs are relative to https://prod.api.appcluster01.ca-central-1.ezmax.com/rest

Method HTTP request Description
customerCreateObjectV1 POST /1/object/customer Create a new Customer
customerGetAutocompleteV2 GET /2/object/customer/getAutocomplete/{sSelector} Retrieve Customers and IDs
customerGetObjectV2 GET /2/object/customer/{pkiCustomerID} Retrieve an existing Customer

customerCreateObjectV1

-(NSURLSessionTask*) customerCreateObjectV1WithCustomerCreateObjectV1Request: (CustomerCreateObjectV1Request*) customerCreateObjectV1Request
        completionHandler: (void (^)(CustomerCreateObjectV1Response* output, NSError* error)) handler;

Create a new Customer

The endpoint allows to create one or many elements at once.

Example

DefaultConfiguration *apiConfig = [DefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


CustomerCreateObjectV1Request* customerCreateObjectV1Request = [[CustomerCreateObjectV1Request alloc] init]; // 

ObjectCustomerApi*apiInstance = [[ObjectCustomerApi alloc] init];

// Create a new Customer
[apiInstance customerCreateObjectV1WithCustomerCreateObjectV1Request:customerCreateObjectV1Request
          completionHandler: ^(CustomerCreateObjectV1Response* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ObjectCustomerApi->customerCreateObjectV1: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
customerCreateObjectV1Request CustomerCreateObjectV1Request*

Return type

CustomerCreateObjectV1Response*

Authorization

Authorization

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

customerGetAutocompleteV2

-(NSURLSessionTask*) customerGetAutocompleteV2WithSSelector: (NSString*) sSelector
    eFilterActive: (NSString*) eFilterActive
    sQuery: (NSString*) sQuery
    acceptLanguage: (HeaderAcceptLanguage) acceptLanguage
        completionHandler: (void (^)(CustomerGetAutocompleteV2Response* output, NSError* error)) handler;

Retrieve Customers and IDs

Get the list of Customer to be used in a dropdown or autocomplete control.

Example

DefaultConfiguration *apiConfig = [DefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


NSString* sSelector = @"sSelector_example"; // The type of Customers to return
NSString* eFilterActive = @"Active"; // Specify which results we want to display. (optional) (default to @"Active")
NSString* sQuery = @"sQuery_example"; // Allow to filter the returned results (optional)
HeaderAcceptLanguage acceptLanguage = [[HeaderAcceptLanguage alloc] init]; //  (optional)

ObjectCustomerApi*apiInstance = [[ObjectCustomerApi alloc] init];

// Retrieve Customers and IDs
[apiInstance customerGetAutocompleteV2WithSSelector:sSelector
              eFilterActive:eFilterActive
              sQuery:sQuery
              acceptLanguage:acceptLanguage
          completionHandler: ^(CustomerGetAutocompleteV2Response* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ObjectCustomerApi->customerGetAutocompleteV2: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
sSelector NSString* The type of Customers to return
eFilterActive NSString* Specify which results we want to display. [optional] [default to @"Active"]
sQuery NSString* Allow to filter the returned results [optional]
acceptLanguage HeaderAcceptLanguage [optional]

Return type

CustomerGetAutocompleteV2Response*

Authorization

Authorization

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

customerGetObjectV2

-(NSURLSessionTask*) customerGetObjectV2WithPkiCustomerID: (NSNumber*) pkiCustomerID
        completionHandler: (void (^)(CustomerGetObjectV2Response* output, NSError* error)) handler;

Retrieve an existing Customer

Example

DefaultConfiguration *apiConfig = [DefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


NSNumber* pkiCustomerID = @56; // The unique ID of the Customer

ObjectCustomerApi*apiInstance = [[ObjectCustomerApi alloc] init];

// Retrieve an existing Customer
[apiInstance customerGetObjectV2WithPkiCustomerID:pkiCustomerID
          completionHandler: ^(CustomerGetObjectV2Response* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling ObjectCustomerApi->customerGetObjectV2: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
pkiCustomerID NSNumber* The unique ID of the Customer

Return type

CustomerGetObjectV2Response*

Authorization

Authorization

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]