The E-fulfilment Shop API allows you to integrate your service with our warehouse.
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.4.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import sw "./efulfilmentshop"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identifield by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to http://localhost/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AddressApi | DeleteAddress | Delete /addresses/{id} | Removes the Address resource. |
AddressApi | GetAddress | Get /addresses/{id} | Retrieves a Address resource. |
AddressApi | GetAddresss | Get /addresses | Retrieves the collection of Address resources. |
AddressApi | PatchAddress | Patch /addresses/{id} | Updates the Address resource. |
AddressApi | PostAddress | Post /addresses | Creates a Address resource. |
AddressApi | PutAddress | Put /addresses/{id} | Replaces the Address resource. |
AuthenticationTokenApi | PostAuthentication | Post /authentication_token | Performs login, returning a token on success. |
CarrierApi | GetCarrier | Get /carriers/{id} | Retrieves a Carrier resource. |
CarrierApi | GetCarriers | Get /carriers | Retrieves the collection of Carrier resources. |
ProductApi | DeleteProduct | Delete /products/{id} | Removes the Product resource. |
ProductApi | GetProduct | Get /products/{id} | Retrieves a Product resource. |
ProductApi | GetProducts | Get /products | Retrieves the collection of Product resources. |
ProductApi | PatchProduct | Patch /products/{id} | Updates the Product resource. |
ProductApi | PostProduct | Post /products | Creates a Product resource. |
ProductApi | PutProduct | Put /products/{id} | Replaces the Product resource. |
PurchaseApi | DeletePurchase | Delete /purchases/{id} | Removes the Purchase resource. |
PurchaseApi | GetPurchase | Get /purchases/{id} | Retrieves a Purchase resource. |
PurchaseApi | GetPurchases | Get /purchases | Retrieves the collection of Purchase resources. |
PurchaseApi | PatchPurchase | Patch /purchases/{id} | Updates the Purchase resource. |
PurchaseApi | PostPurchase | Post /purchases | Creates a Purchase resource. |
PurchaseApi | PutPurchase | Put /purchases/{id} | Replaces the Purchase resource. |
PurchaseLineApi | GetPurchaseLine | Get /purchase_lines/{id} | Retrieves a PurchaseLine resource. |
PurchaseLineApi | GetPurchaseLines | Get /purchase_lines | Retrieves the collection of PurchaseLine resources. |
PurchaseLineApi | PatchPurchaseLine | Patch /purchase_lines/{id} | Updates the PurchaseLine resource. |
PurchaseLineApi | PostPurchaseLine | Post /purchase_lines | Creates a PurchaseLine resource. |
PurchaseLineApi | PutPurchaseLine | Put /purchase_lines/{id} | Replaces the PurchaseLine resource. |
SaleApi | CancelSale | Post /sales/{id}/cancel | Cancels a sale. |
SaleApi | ConfirmSale | Post /sales/{id}/confirm | Confirms a sale. |
SaleApi | DeleteSale | Delete /sales/{id} | Removes the Sale resource. |
SaleApi | GetSale | Get /sales/{id} | Retrieves a Sale resource. |
SaleApi | GetSales | Get /sales | Retrieves the collection of Sale resources. |
SaleApi | PatchSale | Patch /sales/{id} | Updates the Sale resource. |
SaleApi | PostSale | Post /sales | Creates a Sale resource. |
SaleApi | PutSale | Put /sales/{id} | Replaces the Sale resource. |
SaleLineApi | GetSaleLine | Get /sale_lines/{id} | Retrieves a SaleLine resource. |
SaleLineApi | GetSaleLines | Get /sale_lines | Retrieves the collection of SaleLine resources. |
SaleLineApi | PatchSaleLine | Patch /sale_lines/{id} | Updates the SaleLine resource. |
SaleLineApi | PostSaleLine | Post /sale_lines | Creates a SaleLine resource. |
SaleLineApi | PutSaleLine | Put /sale_lines/{id} | Replaces the SaleLine resource. |
ShipmentApi | GetShipment | Get /shipments/{id} | Retrieves a Shipment resource. |
ShipmentApi | GetShipments | Get /shipments | Retrieves the collection of Shipment resources. |
SupplierApi | DeleteSupplier | Delete /suppliers/{id} | Removes the Supplier resource. |
SupplierApi | GetSupplier | Get /suppliers/{id} | Retrieves a Supplier resource. |
SupplierApi | GetSuppliers | Get /suppliers | Retrieves the collection of Supplier resources. |
SupplierApi | PatchSupplier | Patch /suppliers/{id} | Updates the Supplier resource. |
SupplierApi | PostSupplier | Post /suppliers | Creates a Supplier resource. |
SupplierApi | PutSupplier | Put /suppliers/{id} | Replaces the Supplier resource. |
- AddressRead
- AddressReadLd
- AddressWrite
- AddressWriteLd
- CarrierRead
- CarrierReadLd
- InlineResponse200
- InlineResponse401
- ProductReadCollection
- ProductReadItem
- ProductReadLdCollection
- ProductReadLdItem
- ProductWrite
- ProductWriteLd
- PurchaseLineRead
- PurchaseLineReadLd
- PurchaseLineWrite
- PurchaseLineWriteLd
- PurchaseRead
- PurchaseReadLd
- PurchaseWrite
- PurchaseWriteLd
- SaleLineRead
- SaleLineReadLd
- SaleLineWrite
- SaleLineWriteLd
- SaleRead
- SaleReadLd
- SaleWrite
- SaleWriteLd
- ShipmentRead
- ShipmentReadLd
- SupplierRead
- SupplierReadLd
- SupplierWrite
- SupplierWriteLd
- UserAuthenticate
- UserAuthenticateLd
- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime