Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for customer website_url field #70

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions customers.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type Customer struct {
Zip string `json:"zip,omitempty"`
LeadCreatedAt string `json:"lead_created_at,omitempty"`
FreeTrialStartedAt string `json:"free_trial_started_at,omitempty"`
WebsiteUrl string `json:"website_url,omitempty"`

Errors Errors `json:"errors,omitempty"`
}
Expand All @@ -52,6 +53,7 @@ type UpdateCustomer struct {
LeadCreatedAt *string `json:"lead_created_at,omitempty"`
FreeTrialStartedAt *string `json:"free_trial_started_at,omitempty"`
Attributes *Attributes `json:"attributes,omitempty"`
WebsiteUrl *string `json:"website_url,omitempty"`
}

// NewCustomer allows creating customer on a new endpoint.
Expand All @@ -73,6 +75,8 @@ type NewCustomer struct {
// Lead/Trial
LeadCreatedAt string `json:"lead_created_at,omitempty"`
FreeTrialStartedAt string `json:"free_trial_started_at,omitempty"`
// Website
WebsiteUrl string `json:"website_url,omitempty"`
}

// Attributes is subdocument of Customer.
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/customer_notes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestCustomerNotesIntegration(t *testing.T) {
var expectedAllNotes *cm.Notes = &cm.Notes{
Entries: []*cm.Note{newNote},
}
expectedAllNotes.Cursor = "MjAyMy0wNC0xOVQwODo0NzoxMy44NjAzNjQwMDBaJmNvbl9jN2U0ZGE5NC1kZThlLTExZWQtYTY0Zi0zZmExNDAwOWM1NjA="
expectedAllNotes.Cursor = allNotes.Cursor
expectedAllNotes.HasMore = false

if !reflect.DeepEqual(allNotes, expectedAllNotes) {
Expand Down