Skip to content

Commit

Permalink
Merge branch 'master' into missing-memberrequest-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
David Tai committed Dec 7, 2019
2 parents 4891b92 + 8a7a5fc commit 21023ce
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ type LineItem struct {

// Contact defines a single contact
type Contact struct {
Company string `json:"customer"`
Company string `json:"company"`
Address1 string `json:"address1"`
Address2 string `json:"address2"`
City string `json:"city"`
Expand Down
2 changes: 1 addition & 1 deletion lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ type MergeFieldOptions struct {
DefaultCountry int `json:"default_Country"`
PhoneFormat string `json:"phone_format"`
DateFormat string `json:"date_format"`
Choices []string `json:"choices"`
Choices []string `json:"choices,omitempty"`
Size int `json:"size"`
}

Expand Down
7 changes: 7 additions & 0 deletions members.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type ListOfMembers struct {

type MemberRequest struct {
EmailAddress string `json:"email_address"`
EmailType string `json:"email_type,omitempty"`
Status string `json:"status"`
StatusIfNew string `json:"status_if_new,omitempty"`
MergeFields map[string]interface{} `json:"merge_fields,omitempty"`
Expand All @@ -34,6 +35,7 @@ type MemberRequest struct {
Location *MemberLocation `json:"location,omitempty"`
IPOpt string `json:"ip_opt,omitempty"`
IPSignup string `json:"ip_signup,omitempty"`
Tags []string `json:"tags,omitempty"`
TimestampSignup string `json:"timestamp_signup,omitempty"`
TimestampOpt string `json:"timestamp_opt,omitempty"`
}
Expand Down Expand Up @@ -87,6 +89,11 @@ type MemberNoteShort struct {
Note string `json:"note"`
}

type MemberTag struct {
ID int `json:"id"`
Name string `json:"name"`
}

func (list ListResponse) GetMembers(params *InterestCategoriesQueryParams) (*ListOfMembers, error) {
if err := list.CanMakeRequest(); err != nil {
return nil, err
Expand Down
8 changes: 4 additions & 4 deletions segments.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type SegmentRequest struct {
type Segment struct {
SegmentRequest

ID int `json:"id"`
ID string `json:"id"`
MemberCount int `json:"member_count"`
Type string `json:"type"`
CreatedAt string `json:"created_at"`
Expand Down Expand Up @@ -70,9 +70,9 @@ type SegmentBatchError struct {

// SegmentConditional represents parameters to filter by
type SegmentConditional struct {
Field string `json:"field"`
OP string `json:"op"`
Value float64 `json:"value"`
Field string `json:"field"`
OP string `json:"op"`
Value interface{} `json:"value"`
}

type SegmentQueryParams struct {
Expand Down

0 comments on commit 21023ce

Please sign in to comment.