Skip to content

Commit

Permalink
Removed Deprecated Fields from Customer Object
Browse files Browse the repository at this point in the history
* Removed Deprecated fields `accepts_marketing` and `accepts_marketing_updated_at` from customer object
  • Loading branch information
deepsidhu1313 committed Jul 23, 2024
1 parent bc4d3e0 commit 9d72d56
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,28 @@ type CustomerServiceOp struct {

// Customer represents a Shopify customer
type Customer struct {
Id uint64 `json:"id,omitempty"`
Email string `json:"email,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
State string `json:"state,omitempty"`
Note string `json:"note,omitempty"`
VerifiedEmail bool `json:"verified_email,omitempty"`
MultipassIdentifier string `json:"multipass_identifier,omitempty"`
OrdersCount int `json:"orders_count,omitempty"`
TaxExempt bool `json:"tax_exempt,omitempty"`
TotalSpent *decimal.Decimal `json:"total_spent,omitempty"`
Phone string `json:"phone,omitempty"`
Tags string `json:"tags,omitempty"`
LastOrderId uint64 `json:"last_order_id,omitempty"`
LastOrderName string `json:"last_order_name,omitempty"`
AcceptsMarketing bool `json:"accepts_marketing,omitempty"`
AcceptsMarketingUpdatedAt *time.Time `json:"accepts_marketing_updated_at,omitempty"`
EmailMarketingConsent *EmailMarketingConsent `json:"email_marketing_consent"`
SMSMarketingConsent *SMSMarketingConsent `json:"sms_marketing_consent"`
DefaultAddress *CustomerAddress `json:"default_address,omitempty"`
Addresses []*CustomerAddress `json:"addresses,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Metafields []Metafield `json:"metafields,omitempty"`
Id uint64 `json:"id,omitempty"`
Email string `json:"email,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
State string `json:"state,omitempty"`
Note string `json:"note,omitempty"`
VerifiedEmail bool `json:"verified_email,omitempty"`
MultipassIdentifier string `json:"multipass_identifier,omitempty"`
OrdersCount int `json:"orders_count,omitempty"`
TaxExempt bool `json:"tax_exempt,omitempty"`
TotalSpent *decimal.Decimal `json:"total_spent,omitempty"`
Phone string `json:"phone,omitempty"`
Tags string `json:"tags,omitempty"`
LastOrderId uint64 `json:"last_order_id,omitempty"`
LastOrderName string `json:"last_order_name,omitempty"`
EmailMarketingConsent *EmailMarketingConsent `json:"email_marketing_consent"`
SMSMarketingConsent *SMSMarketingConsent `json:"sms_marketing_consent"`
DefaultAddress *CustomerAddress `json:"default_address,omitempty"`
Addresses []*CustomerAddress `json:"addresses,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Metafields []Metafield `json:"metafields,omitempty"`
}

// Represents the result from the customers/X.json endpoint
Expand Down

0 comments on commit 9d72d56

Please sign in to comment.