# CymbioApi.StoreApi

All URIs are relative to *http://api1.cym.bio/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**addAdmin**](StoreApi.md#addAdmin) | **POST** /stores/addAdmin | Adds another admin to the store.
[**becomeSupplier**](StoreApi.md#becomeSupplier) | **POST** /stores/becomeSupplier | Apply to become a selling store.
[**cancelBecomeSupplier**](StoreApi.md#cancelBecomeSupplier) | **POST** /stores/cancelBecomeSupplier | Cancel Application to become a selling store.
[**cancelPaymentMethod**](StoreApi.md#cancelPaymentMethod) | **GET** /stores/cancelPaymentMethod | Gets the url to the given payment method approval page.
[**deleteStore**](StoreApi.md#deleteStore) | **DELETE** /stores | Marks a store as un-active
[**getPaymentMethodUrl**](StoreApi.md#getPaymentMethodUrl) | **GET** /stores/getPaymentMethodUrl | Gets the url to the given payment method approval page.
[**getStore**](StoreApi.md#getStore) | **GET** /stores | Retrieves a store
[**postStore**](StoreApi.md#postStore) | **POST** /stores | Saves or updates a store
[**putStore**](StoreApi.md#putStore) | **PUT** /stores | Updates a store
[**saveCreditcard**](StoreApi.md#saveCreditcard) | **POST** /stores/saveCreditcard | Saves a new creditcard for the store.


<a name="addAdmin"></a>
# **addAdmin**
> InlineResponse2001 addAdmin(email)

Adds another admin to the store.

Adds an admin to the store, receives a user email.

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.StoreApi();

var email = "email_example"; // String | The user email to make admin


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.addAdmin(email, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **email** | **String**| The user email to make admin | 

### Return type

[**InlineResponse2001**](InlineResponse2001.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="becomeSupplier"></a>
# **becomeSupplier**
> InlineResponse2001 becomeSupplier(form)

Apply to become a selling store.

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.StoreApi();

var form = new CymbioApi.BecomeSupplierForm(); // BecomeSupplierForm | Become a seller form data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.becomeSupplier(form, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **form** | [**BecomeSupplierForm**](BecomeSupplierForm.md)| Become a seller form data | 

### Return type

[**InlineResponse2001**](InlineResponse2001.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="cancelBecomeSupplier"></a>
# **cancelBecomeSupplier**
> InlineResponse2001 cancelBecomeSupplier()

Cancel Application to become a selling store.

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.StoreApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.cancelBecomeSupplier(callback);
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**InlineResponse2001**](InlineResponse2001.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="cancelPaymentMethod"></a>
# **cancelPaymentMethod**
> InlineResponse2001 cancelPaymentMethod()

Gets the url to the given payment method approval page.

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.StoreApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.cancelPaymentMethod(callback);
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**InlineResponse2001**](InlineResponse2001.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="deleteStore"></a>
# **deleteStore**
> InlineResponse2001 deleteStore()

Marks a store as un-active

Updates the store from the token to status un-active

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.StoreApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteStore(callback);
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**InlineResponse2001**](InlineResponse2001.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="getPaymentMethodUrl"></a>
# **getPaymentMethodUrl**
> InlineResponse2007 getPaymentMethodUrl(paymentMethod, callbackUrl)

Gets the url to the given payment method approval page.

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.StoreApi();

var paymentMethod = "paymentMethod_example"; // String | 

var callbackUrl = "callbackUrl_example"; // String | URL to redirect the page to after the interaction. a query parameter success=true/false will be added to the callback.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getPaymentMethodUrl(paymentMethod, callbackUrl, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **paymentMethod** | **String**|  | 
 **callbackUrl** | **String**| URL to redirect the page to after the interaction. a query parameter success&#x3D;true/false will be added to the callback. | 

### Return type

[**InlineResponse2007**](InlineResponse2007.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="getStore"></a>
# **getStore**
> Store getStore()

Retrieves a store

Retrieves a store based on the store token given.

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.StoreApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getStore(callback);
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**Store**](Store.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="postStore"></a>
# **postStore**
> InlineResponse2006 postStore(store)

Saves or updates a store

Saves a new store unless the authenticated user has a store with the same name, then it will update the existing store.

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.StoreApi();

var store = new CymbioApi.NewStore(); // NewStore | The store to save


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.postStore(store, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **store** | [**NewStore**](NewStore.md)| The store to save | 

### Return type

[**InlineResponse2006**](InlineResponse2006.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="putStore"></a>
# **putStore**
> Store putStore(store)

Updates a store

Updates the store from the token

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.StoreApi();

var store = new CymbioApi.Store(); // Store | The store to update


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.putStore(store, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **store** | [**Store**](Store.md)| The store to update | 

### Return type

[**Store**](Store.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

<a name="saveCreditcard"></a>
# **saveCreditcard**
> InlineResponse2001 saveCreditcard(body)

Saves a new creditcard for the store.

### Example
```javascript
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.default;

// Configure API key authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwt.apiKeyPrefix = 'Token';

var apiInstance = new CymbioApi.StoreApi();

var body = new CymbioApi.Body(); // Body | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.saveCreditcard(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Body**](Body.md)|  | 

### Return type

[**InlineResponse2001**](InlineResponse2001.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: application/json, application/x-www-form-urlencoded
 - **Accept**: application/json

