Skip to content

Commit

Permalink
Merge pull request #9 from jjideenschmiede/development
Browse files Browse the repository at this point in the history
Update webhook return values
  • Loading branch information
gowizzard authored Dec 3, 2021
2 parents 0ba4a6c + 683c289 commit 260887f
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions integrations_and_orders.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ package gosendcloud
import (
"encoding/json"
"fmt"
"time"
)

// InsertingShipmentsBody is to structure the data
Expand Down Expand Up @@ -118,8 +119,30 @@ type InsertingShipmentsReturn struct {
} `json:"error,omitempty"`
}

// InsertingShipmentsWebhookReturn is to decode the json data
type InsertingShipmentsWebhookReturn struct {
// InsertingShipmentsIntegrationWebhookReturn is to decode the json data
type InsertingShipmentsIntegrationWebhookReturn struct {
Action string `json:"action"`
Timestamp int64 `json:"timestamp"`
PublicKey string `json:"public_key"`
SecretKey string `json:"secret_key"`
IntegrationId int `json:"integration_id"`
Integration struct {
Id int `json:"id"`
ShopName string `json:"shop_name"`
ShopUrl string `json:"shop_url"`
System string `json:"system"`
FailingSince interface{} `json:"failing_since"`
LastFetch interface{} `json:"last_fetch"`
LastUpdatedAt time.Time `json:"last_updated_at"`
ServicePointEnabled bool `json:"service_point_enabled"`
ServicePointCarriers []interface{} `json:"service_point_carriers"`
WebhookActive bool `json:"webhook_active"`
WebhookUrl string `json:"webhook_url"`
} `json:"integration"`
}

// InsertingShipmentsParcelStatusWebhookReturn is to decode the json data
type InsertingShipmentsParcelStatusWebhookReturn struct {
Action string `json:"action"`
Parcel struct {
Id int `json:"id"`
Expand Down

0 comments on commit 260887f

Please sign in to comment.