Skip to content

Commit

Permalink
Add support for customer website_url field (#70)
Browse files Browse the repository at this point in the history
* Add support for customer website_url field

* Fix test

* Remove stray tabs
  • Loading branch information
whobubble committed Feb 8, 2024
1 parent 23d47c6 commit 02667da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit 02667da

Please sign in to comment.