Skip to content

Commit

Permalink
fix xml generation for order creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Molodkovets Bogdan committed Mar 3, 2020
1 parent 929c768 commit 2a36787
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ func (cl *Client) CreateOrder(req *CreateOrderRequest) ([]*OrderStatus, error) {
}{
operationCreateOrder{
&createOrder{
req,
Namespace: orderNamespace,
Orders: req,
},
},
}
Expand Down
10 changes: 6 additions & 4 deletions order2.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,16 @@ type operationCreateOrder struct {
}

type createOrder struct {
Orders *CreateOrderRequest `xml:"orders,omitempty"`
Namespace string `xml:"xmlns,attr"`
Orders *CreateOrderRequest `xml:"orders,omitempty"`
}

//CreateOrderRequest CreateOrder request body
type CreateOrderRequest struct {
Auth *Auth `xml:"auth,omitempty"`
Header *Header `xml:"header,omitempty"`
Order []*Order `xml:"order,omitempty"`
Namespace string `xml:"xmlns,attr"`
Auth *Auth `xml:"auth,omitempty"`
Header *Header `xml:"header,omitempty"`
Order []*Order `xml:"order,omitempty"`
}

//Order to creation
Expand Down

0 comments on commit 2a36787

Please sign in to comment.