Skip to content

Commit

Permalink
fix Create Customer
Browse files Browse the repository at this point in the history
  • Loading branch information
erfandiakoo committed Dec 7, 2024
1 parent 0f0a62e commit a33dcff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ func NewClient(basePath string, options ...func(*GoArpa)) *GoArpa {
}

c.Config.GetServiceTokenEndpoint = makeURL("serv", "token", "GetServiceToken")
c.Config.CreateCustomerEndpoint = makeURL("serv", "api", "PostBussiness")
c.Config.CreateTransactionEndpoint = makeURL("serv", "Api", "NewTransaction")
c.Config.CreateServiceEndpoint = makeURL("serv", "Api", "PostService")
c.Config.CreateCustomerEndpoint = makeURL("serv", "api", "PostBusiness")
c.Config.CreateTransactionEndpoint = makeURL("serv", "api", "NewTransaction")
c.Config.CreateServiceEndpoint = makeURL("serv", "api", "PostService")
c.Config.GetCustomerEndpoint = makeURL("serv", "api", "GetBusiness")

for _, option := range options {
Expand Down
11 changes: 8 additions & 3 deletions models.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,15 @@ type CreateCustomerRequest struct {
BusinessCategoryID *int64 `json:"BusinessCategoryId"`
}

type RetCustomerResponse struct {
Data CreateCustomerResponse `json:"data"`
Error interface{} `json:"error"`
}

type CreateCustomerResponse struct {
BusinessCode string `json:"BussinesCode"`
BusinessID string `json:"BussinessID"`
Existed bool `json:"Existed"`
BusinessID string `json:"BusinessId"`
BusinessCode string `json:"BusinessCode"`
Existed string `json:"Existed"`
}

type CreateTransactionRequest struct {
Expand Down

0 comments on commit a33dcff

Please sign in to comment.