Skip to content

Commit

Permalink
Merge pull request #25 from jjideenschmiede/development
Browse files Browse the repository at this point in the history
fix: Change struct to slice.
  • Loading branch information
gowizzard authored Mar 28, 2023
2 parents eb852ce + 6b25d1b commit 2a2e627
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions fulfillments.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package goshopify

import (
"encoding/json"
"fmt"
"io"
"net/http"
"time"
)
Expand All @@ -14,10 +16,10 @@ type FulfillmentsBody struct {
}

type FulfillmentsBodyFulfillment struct {
Message string `json:"message"`
NotifyCustomer bool `json:"notify_customer"`
TrackingInfo FulfillmentsBodyTrackingInfo `json:"tracking_info"`
LineItemsByFulfillmentOrder FulfillmentsBodyLineItemsByFulfillmentOrder `json:"line_items_by_fulfillment_order"`
Message string `json:"message"`
NotifyCustomer bool `json:"notify_customer"`
TrackingInfo FulfillmentsBodyTrackingInfo `json:"tracking_info"`
LineItemsByFulfillmentOrder []FulfillmentsBodyLineItemsByFulfillmentOrder `json:"line_items_by_fulfillment_order"`
}

type FulfillmentsBodyTrackingInfo struct {
Expand Down Expand Up @@ -138,6 +140,9 @@ func Fulfillments(body FulfillmentsBody, r Request) (FulfillmentsReturn, error)
// Close request
defer response.Body.Close()

read, _ := io.ReadAll(response.Body)
fmt.Println(string(read))

// Decode data
var decode FulfillmentsReturn

Expand Down

0 comments on commit 2a2e627

Please sign in to comment.