diff --git a/README.md b/README.md index 88530a3..691aeca 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Recurly Client for Go - [![Build Status](https://travis-ci.org/blacklightcms/recurly.svg?branch=master)](https://travis-ci.org/blacklightcms/recurly) [![GoDoc](https://godoc.org/github.com/blacklightcms/recurly?status.svg)](https://godoc.org/github.com/blacklightcms/recurly/) + [![Build Status](https://travis-ci.org/blacklightcms/recurly.svg?branch=master)](https://travis-ci.org/blacklightcms/recurly) [![GoDoc](https://godoc.org/github.com/autopilot3/recurly?status.svg)](https://godoc.org/github.com/autopilot3/recurly/) Recurly is a Go (golang) API Client for the [Recurly](https://recurly.com/) API. It is actively maintained, unit tested, and uses no external dependencies. The vast majority of the API is implemented. @@ -25,20 +25,20 @@ Install: ```shell -go get github.com/blacklightcms/recurly +go get github.com/autopilot3/recurly ``` Import: ```go -import "github.com/blacklightcms/recurly" +import "github.com/autopilot3/recurly" ``` Resources: - - [API Docs](https://godoc.org/github.com/blacklightcms/recurly/) - - [Examples](https://godoc.org/github.com/blacklightcms/recurly/#pkg-examples) + - [API Docs](https://godoc.org/github.com/autopilot3/recurly/) + - [Examples](https://godoc.org/github.com/autopilot3/recurly/#pkg-examples) ## Note on v1 and breaking changes -If migrating from a previous version of the library, there was a large refactor with breaking changes released to address some design issues with the library. See the [migration guide](https://github.com/blacklightcms/recurly/wiki/v1-Migration-Guide) for steps on how to migrate to the latest version. +If migrating from a previous version of the library, there was a large refactor with breaking changes released to address some design issues with the library. See the [migration guide](https://github.com/autopilot3/recurly/wiki/v1-Migration-Guide) for steps on how to migrate to the latest version. This is recommended for all users. @@ -54,7 +54,7 @@ a, err := client.Accounts.Get(context.Background(), "1") ``` ## Examples and How To -Please go through [examples](https://godoc.org/github.com/blacklightcms/recurly/#pkg-examples) for detailed examples of using this package. +Please go through [examples](https://godoc.org/github.com/autopilot3/recurly/#pkg-examples) for detailed examples of using this package. The examples explain important cases like: @@ -152,7 +152,7 @@ The usage is to parse the webhook from a reader, then use a switch statement to determine the type of webhook received. ```go -// import "github.com/blacklightcms/recurly/webhooks" +// import "github.com/autopilot3/recurly/webhooks" hook, err := webhooks.Parse(r) if e, ok := err.(*webhooks.ErrUnknownNotification); ok { @@ -186,7 +186,7 @@ when testing your own code that uses this library. Instead we recommend using the `mock` package. The `mock` package provides mocks for all of the different services in this library. -For examples of how to test your code using mocks, visit the [GoDoc examples](https://godoc.org/github.com/blacklightcms/recurly/mock/). +For examples of how to test your code using mocks, visit the [GoDoc examples](https://godoc.org/github.com/autopilot3/recurly/mock/). > **NOTE**: If you need to go beyond mocks and test requests/responses, `testing.go` exports `TestServer`. This is how the library tests itself. See the GoDoc or the `*_test.go` files for usage examples. diff --git a/accounts_test.go b/accounts_test.go index c40b763..e38ba4f 100644 --- a/accounts_test.go +++ b/accounts_test.go @@ -8,7 +8,7 @@ import ( "strconv" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) @@ -476,7 +476,8 @@ func NewTestAccountBalance() *recurly.AccountBalance { XMLName: xml.Name{Local: "account_balance"}, PastDue: false, Balance: recurly.UnitAmount{ - USD: 3000, + USD: recurly.NewAmount(3000), + EUR: recurly.NewAmount(0), }, } } diff --git a/add_ons.go b/add_ons.go index 72f4952..3c83f58 100644 --- a/add_ons.go +++ b/add_ons.go @@ -64,19 +64,23 @@ type AddOn struct { CreatedAt NullTime `xml:"created_at,omitempty"` } +func NewAmount(i int) *int { + return &i +} + // UnitAmount can read or write amounts in various currencies. type UnitAmount struct { - USD int `xml:"USD,omitempty"` - EUR int `xml:"EUR,omitempty"` - GBP int `xml:"GBP,omitempty"` - CAD int `xml:"CAD,omitempty"` - AUD int `xml:"AUD,omitempty"` + USD *int `xml:"USD,omitempty"` + EUR *int `xml:"EUR,omitempty"` + GBP *int `xml:"GBP,omitempty"` + CAD *int `xml:"CAD,omitempty"` + AUD *int `xml:"AUD,omitempty"` } // MarshalXML ensures UnitAmount is not marshaled unless one or more currencies // has a value greater than zero. func (u UnitAmount) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - if u.USD > 0 || u.EUR > 0 || u.CAD > 0 || u.GBP > 0 || u.AUD > 0 { + if u.USD != nil || u.EUR != nil || u.CAD != nil || u.GBP != nil || u.AUD != nil { type uaAlias UnitAmount e.EncodeElement(uaAlias(u), start) } diff --git a/add_ons_test.go b/add_ons_test.go index a904b87..861f32e 100644 --- a/add_ons_test.go +++ b/add_ons_test.go @@ -8,7 +8,7 @@ import ( "strconv" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) @@ -81,7 +81,7 @@ func TestAddOns_Encoding(t *testing.T) { `), }, { - v: recurly.AddOn{UnitAmountInCents: recurly.UnitAmount{USD: 200}}, + v: recurly.AddOn{UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(200)}}, expected: MustCompactString(` @@ -180,7 +180,7 @@ func TestUnitAmount(t *testing.T) { { expected: "", }, - {v: s{Amount: recurly.UnitAmount{USD: 1000}}, + {v: s{Amount: recurly.UnitAmount{USD: recurly.NewAmount(1000)}}, expected: MustCompactString(` @@ -189,7 +189,7 @@ func TestUnitAmount(t *testing.T) { `), }, - {v: s{Amount: recurly.UnitAmount{USD: 800, EUR: 650}}, + {v: s{Amount: recurly.UnitAmount{USD: recurly.NewAmount(800), EUR: recurly.NewAmount(650)}}, expected: MustCompactString(` @@ -199,7 +199,7 @@ func TestUnitAmount(t *testing.T) { `), }, - {v: s{Amount: recurly.UnitAmount{EUR: 650}}, + {v: s{Amount: recurly.UnitAmount{EUR: recurly.NewAmount(650)}}, expected: MustCompactString(` @@ -208,7 +208,7 @@ func TestUnitAmount(t *testing.T) { `), }, - {v: s{Amount: recurly.UnitAmount{GBP: 3000}}, + {v: s{Amount: recurly.UnitAmount{GBP: recurly.NewAmount(3000)}}, expected: MustCompactString(` @@ -217,7 +217,7 @@ func TestUnitAmount(t *testing.T) { `), }, - {v: s{Amount: recurly.UnitAmount{CAD: 300}}, + {v: s{Amount: recurly.UnitAmount{CAD: recurly.NewAmount(300)}}, expected: MustCompactString(` @@ -226,7 +226,7 @@ func TestUnitAmount(t *testing.T) { `), }, - {v: s{Amount: recurly.UnitAmount{AUD: 400}}, + {v: s{Amount: recurly.UnitAmount{AUD: recurly.NewAmount(400)}}, expected: MustCompactString(` @@ -235,7 +235,7 @@ func TestUnitAmount(t *testing.T) { `), }, - {v: s{Amount: recurly.UnitAmount{USD: 1}}, + {v: s{Amount: recurly.UnitAmount{USD: recurly.NewAmount(1)}}, expected: MustCompactString(` @@ -385,7 +385,7 @@ func NewTestAddOn() *recurly.AddOn { DisplayQuantityOnHostedPage: recurly.NewBool(false), TaxCode: "digital", UnitAmountInCents: recurly.UnitAmount{ - USD: 200, + USD: recurly.NewAmount(200), }, TierType: "volume", Tiers: &[]recurly.Tier{*NewTestTier()}, @@ -399,7 +399,7 @@ func NewTestTier() *recurly.Tier { XMLName: xml.Name{Local: "tier"}, EndingQuantity: 500, UnitAmountInCents: recurly.UnitAmount{ - USD: 100, + USD: recurly.NewAmount(100), }, } } diff --git a/adjustments_test.go b/adjustments_test.go index 18efeef..fe6e4df 100644 --- a/adjustments_test.go +++ b/adjustments_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) diff --git a/automated_exports_test.go b/automated_exports_test.go index 8eb8d8a..ac3d71d 100644 --- a/automated_exports_test.go +++ b/automated_exports_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) diff --git a/billing.go b/billing.go index a730fa5..272876f 100644 --- a/billing.go +++ b/billing.go @@ -83,10 +83,10 @@ type Billing struct { FirstSix string `xml:"first_six,omitempty"` LastFour string `xml:"last_four,omitempty"` CardType string `xml:"card_type,omitempty"` - Number int `xml:"number,omitempty"` + Number string `xml:"number,omitempty"` Month int `xml:"month,omitempty"` Year int `xml:"year,omitempty"` - VerificationValue int `xml:"verification_value,omitempty"` // Create/update only + VerificationValue string `xml:"verification_value,omitempty"` // Create/update only // Paypal PaypalAgreementID string `xml:"paypal_billing_agreement_id,omitempty"` diff --git a/billing_test.go b/billing_test.go index 5574854..da07d78 100644 --- a/billing_test.go +++ b/billing_test.go @@ -9,7 +9,7 @@ import ( "strconv" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) @@ -115,7 +115,7 @@ func TestBilling_Encoding(t *testing.T) { `), }, { - v: recurly.Billing{Number: 4111111111111111, Month: 5, Year: 2020, VerificationValue: 111}, + v: recurly.Billing{Number: "4111111111111111", Month: 5, Year: 2020, VerificationValue: "111"}, expected: MustCompactString(` 4111111111111111 @@ -352,7 +352,7 @@ func TestBilling_Create(t *testing.T) { State: "CA", Zip: "94105", Country: "US", - Number: 4111111111111111, + Number: "4111111111111111", Month: 10, Year: 2020, }); !s.Invoked { @@ -480,7 +480,7 @@ func TestBilling_Update(t *testing.T) { State: "CA", Zip: "94105", Country: "US", - Number: 4111111111111111, + Number: "4111111111111111", Month: 10, Year: 2020, }); !s.Invoked { diff --git a/coupons_test.go b/coupons_test.go index ea21d61..dcd1553 100644 --- a/coupons_test.go +++ b/coupons_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) @@ -102,7 +102,7 @@ func TestCoupons_Encoding(t *testing.T) { Type: "single_code", Name: "Special 10% off", DiscountType: "dollars", - DiscountInCents: &recurly.UnitAmount{USD: 100}, + DiscountInCents: &recurly.UnitAmount{USD: recurly.NewAmount(100)}, MaxRedemptions: recurly.NewInt(2), MaxRedemptionsPerAccount: recurly.NewInt(1), }, @@ -305,7 +305,7 @@ func TestCoupons_Update(t *testing.T) { State: "redeemable", Type: "bulk", DiscountType: "dollars", - DiscountInCents: &recurly.UnitAmount{USD: 2000}, + DiscountInCents: &recurly.UnitAmount{USD: recurly.NewAmount(2000)}, RedemptionResource: "account", AppliesToAllPlans: false, UniqueCodeTemplate: "'savemore'99999999", @@ -354,7 +354,7 @@ func TestCoupons_Restore(t *testing.T) { State: "redeemable", Type: "bulk", DiscountType: "dollars", - DiscountInCents: &recurly.UnitAmount{USD: 2000}, + DiscountInCents: &recurly.UnitAmount{USD: recurly.NewAmount(2000)}, RedemptionResource: "account", AppliesToAllPlans: false, UniqueCodeTemplate: "'savemore'99999999", @@ -477,7 +477,7 @@ func NewTestCoupon() *recurly.Coupon { State: "redeemable", Type: "bulk", DiscountType: "dollars", - DiscountInCents: &recurly.UnitAmount{USD: 2000}, + DiscountInCents: &recurly.UnitAmount{USD: recurly.NewAmount(2000)}, RedeemByDate: recurly.NewTime(MustParseTime("2014-01-01T07:00:00Z")), RedemptionResource: "account", MaxRedemptions: recurly.NewInt(10), diff --git a/credit_payments_test.go b/credit_payments_test.go index 066af09..bec33a1 100644 --- a/credit_payments_test.go +++ b/credit_payments_test.go @@ -6,7 +6,7 @@ import ( "net/http" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) diff --git a/doc.go b/doc.go index c537f7e..91517a2 100644 --- a/doc.go +++ b/doc.go @@ -6,7 +6,7 @@ Usage Construct a new Recurly client, then use the various services on the client to access different parts of the Recurly API. For example: - import "github.com/blacklightcms/recurly" + import "github.com/autopilot3/recurly" func main() { client := recurly.NewClient("your-subdomain", "APIKEY") diff --git a/doc_test.go b/doc_test.go index 4a64953..15a0f13 100644 --- a/doc_test.go +++ b/doc_test.go @@ -6,7 +6,7 @@ import ( "net/http" "time" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var client *recurly.Client diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..07d4b37 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/autopilot3/recurly + +go 1.15 + +require github.com/google/go-cmp v0.2.0 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..5f4f636 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= diff --git a/invoices_test.go b/invoices_test.go index 0f18c4c..1ac6467 100644 --- a/invoices_test.go +++ b/invoices_test.go @@ -9,7 +9,7 @@ import ( "strconv" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) diff --git a/items_test.go b/items_test.go index 9bd0fd6..74d437e 100644 --- a/items_test.go +++ b/items_test.go @@ -8,7 +8,7 @@ import ( "strconv" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) diff --git a/mock/accounts.go b/mock/accounts.go index 0de250f..d988e88 100644 --- a/mock/accounts.go +++ b/mock/accounts.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.AccountsService = &AccountsService{} diff --git a/mock/add_ons.go b/mock/add_ons.go index ff4a984..b23d54e 100644 --- a/mock/add_ons.go +++ b/mock/add_ons.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.AddOnsService = &AddOnsService{} diff --git a/mock/adjustments.go b/mock/adjustments.go index 76bf4bb..3bfa000 100644 --- a/mock/adjustments.go +++ b/mock/adjustments.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.AdjustmentsService = &AdjustmentsService{} diff --git a/mock/automated_exports.go b/mock/automated_exports.go index 31a2eca..b3018e1 100644 --- a/mock/automated_exports.go +++ b/mock/automated_exports.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.AutomatedExportsService = &AutomatedExportsService{} diff --git a/mock/billing.go b/mock/billing.go index 27a6731..67c28f3 100644 --- a/mock/billing.go +++ b/mock/billing.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.BillingService = &BillingService{} diff --git a/mock/client.go b/mock/client.go index bfe570a..c4e1767 100644 --- a/mock/client.go +++ b/mock/client.go @@ -1,7 +1,7 @@ package mock import ( - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) // Client is a test wrapper for recurly.Client holding mocks for diff --git a/mock/coupons.go b/mock/coupons.go index 617c82f..f1e5d48 100644 --- a/mock/coupons.go +++ b/mock/coupons.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.CouponsService = &CouponsService{} diff --git a/mock/credit_payments.go b/mock/credit_payments.go index 75f23e4..360fb6e 100644 --- a/mock/credit_payments.go +++ b/mock/credit_payments.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.CreditPaymentsService = &CreditPaymentsService{} diff --git a/mock/doc.go b/mock/doc.go index 3bea7a5..2ec2cab 100644 --- a/mock/doc.go +++ b/mock/doc.go @@ -82,7 +82,7 @@ Then in your test suite you might configure your own wrapper similar to mock.Cli "context" "github.com/your-project/foo" - "github.com/blacklightcms/recurly/mock" + "github.com/autopilot3/recurly/mock" ) // Provider is a test wrapper for foo.Provider. diff --git a/mock/example_test.go b/mock/example_test.go index 7370929..4f26fd5 100644 --- a/mock/example_test.go +++ b/mock/example_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/blacklightcms/recurly" - "github.com/blacklightcms/recurly/mock" + "github.com/autopilot3/recurly" + "github.com/autopilot3/recurly/mock" "github.com/google/go-cmp/cmp" ) diff --git a/mock/invoices.go b/mock/invoices.go index 216379d..441a950 100644 --- a/mock/invoices.go +++ b/mock/invoices.go @@ -4,7 +4,7 @@ import ( "bytes" "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.InvoicesService = &InvoicesService{} diff --git a/mock/pager.go b/mock/pager.go index 1657f05..2cada8e 100644 --- a/mock/pager.go +++ b/mock/pager.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.Pager = &Pager{} diff --git a/mock/plans.go b/mock/plans.go index 447856c..0c0ec39 100644 --- a/mock/plans.go +++ b/mock/plans.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.PlansService = &PlansService{} diff --git a/mock/purchases.go b/mock/purchases.go index 5978775..e5c680c 100644 --- a/mock/purchases.go +++ b/mock/purchases.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.PurchasesService = &PurchasesService{} diff --git a/mock/redemptions.go b/mock/redemptions.go index 5464ef3..c7693fb 100644 --- a/mock/redemptions.go +++ b/mock/redemptions.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.RedemptionsService = &RedemptionsService{} diff --git a/mock/shipping_address.go b/mock/shipping_address.go index c843f2f..66a2746 100644 --- a/mock/shipping_address.go +++ b/mock/shipping_address.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.ShippingAddressesService = &ShippingAddressesService{} diff --git a/mock/shipping_methods.go b/mock/shipping_methods.go index 73a1c60..06f6431 100644 --- a/mock/shipping_methods.go +++ b/mock/shipping_methods.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.ShippingMethodsService = &ShippingMethodsService{} diff --git a/mock/subscriptions.go b/mock/subscriptions.go index b6529d8..0e4c9ed 100644 --- a/mock/subscriptions.go +++ b/mock/subscriptions.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.SubscriptionsService = &SubscriptionsService{} diff --git a/mock/transactions.go b/mock/transactions.go index 2c1b09d..ef76063 100644 --- a/mock/transactions.go +++ b/mock/transactions.go @@ -3,7 +3,7 @@ package mock import ( "context" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) var _ recurly.TransactionsService = &TransactionsService{} diff --git a/pager_test.go b/pager_test.go index 7d70a62..955d22d 100644 --- a/pager_test.go +++ b/pager_test.go @@ -6,7 +6,7 @@ import ( "net/url" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) diff --git a/plans.go b/plans.go index 6fe6317..f616a74 100644 --- a/plans.go +++ b/plans.go @@ -57,6 +57,7 @@ type Plan struct { IntervalLength int `xml:"plan_interval_length,omitempty"` TrialIntervalUnit string `xml:"trial_interval_unit,omitempty"` TrialIntervalLength int `xml:"trial_interval_length,omitempty"` + TrialRequiresBillingInfo NullBool `xml:"trial_requires_billing_info,omitempty"` TotalBillingCycles NullInt `xml:"total_billing_cycles,omitempty"` AccountingCode string `xml:"accounting_code,omitempty"` CreatedAt NullTime `xml:"created_at,omitempty"` diff --git a/plans_test.go b/plans_test.go index 656d112..3262a68 100644 --- a/plans_test.go +++ b/plans_test.go @@ -8,7 +8,7 @@ import ( "strconv" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) @@ -27,7 +27,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, Description: "abc"}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, Description: "abc"}, expected: MustCompactString(` Gold plan @@ -39,7 +39,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, AccountingCode: "gold"}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, AccountingCode: "gold"}, expected: MustCompactString(` Gold plan @@ -51,7 +51,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, IntervalUnit: "months"}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, IntervalUnit: "months"}, expected: MustCompactString(` Gold plan @@ -63,7 +63,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, IntervalLength: 1}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, IntervalLength: 1}, expected: MustCompactString(` Gold plan @@ -75,7 +75,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, TrialIntervalUnit: "days"}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, TrialIntervalUnit: "days"}, expected: MustCompactString(` Gold plan @@ -87,7 +87,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", AutoRenew: true, UnitAmountInCents: recurly.UnitAmount{USD: 1500}, TrialIntervalLength: 10}, + v: recurly.Plan{Name: "Gold plan", AutoRenew: true, UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, TrialIntervalLength: 10}, expected: MustCompactString(` Gold plan @@ -100,7 +100,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, IntervalUnit: "months"}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, IntervalUnit: "months"}, expected: MustCompactString(` Gold plan @@ -112,7 +112,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, SetupFeeInCents: recurly.UnitAmount{USD: 1000, EUR: 800}}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, SetupFeeInCents: recurly.UnitAmount{USD: recurly.NewAmount(1000), EUR: recurly.NewAmount(800)}}, expected: MustCompactString(` Gold plan @@ -127,7 +127,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, TotalBillingCycles: recurly.NewInt(24)}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, TotalBillingCycles: recurly.NewInt(24)}, expected: MustCompactString(` Gold plan @@ -139,7 +139,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, UnitName: "unit"}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, UnitName: "unit"}, expected: MustCompactString(` Gold plan @@ -151,7 +151,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, DisplayQuantity: recurly.NewBool(true)}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, DisplayQuantity: recurly.NewBool(true)}, expected: MustCompactString(` Gold plan @@ -163,7 +163,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, DisplayQuantity: recurly.NewBool(false)}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, DisplayQuantity: recurly.NewBool(false)}, expected: MustCompactString(` Gold plan @@ -175,7 +175,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, SuccessURL: "https://example.com/success"}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, SuccessURL: "https://example.com/success"}, expected: MustCompactString(` Gold plan @@ -187,7 +187,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, CancelURL: "https://example.com/cancel"}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, CancelURL: "https://example.com/cancel"}, expected: MustCompactString(` Gold plan @@ -199,7 +199,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, TaxExempt: recurly.NewBool(true)}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, TaxExempt: recurly.NewBool(true)}, expected: MustCompactString(` Gold plan @@ -211,7 +211,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, TaxExempt: recurly.NewBool(false)}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, TaxExempt: recurly.NewBool(false)}, expected: MustCompactString(` Gold plan @@ -223,7 +223,7 @@ func TestPlans_Encoding(t *testing.T) { `), }, { - v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: 1500}, TaxCode: "physical"}, + v: recurly.Plan{Name: "Gold plan", UnitAmountInCents: recurly.UnitAmount{USD: recurly.NewAmount(1500)}, TaxCode: "physical"}, expected: MustCompactString(` Gold plan @@ -398,12 +398,12 @@ func NewTestPlan() *recurly.Plan { TrialIntervalUnit: "days", TaxExempt: recurly.NewBool(false), UnitAmountInCents: recurly.UnitAmount{ - USD: 6000, - EUR: 4500, + USD: recurly.NewAmount(6000), + EUR: recurly.NewAmount(4500), }, SetupFeeInCents: recurly.UnitAmount{ - USD: 1000, - EUR: 800, + USD: recurly.NewAmount(1000), + EUR: recurly.NewAmount(800), }, CreatedAt: recurly.NewTime(MustParseTime("2015-05-29T17:38:15Z")), } diff --git a/purchases_test.go b/purchases_test.go index 554dd9f..200f778 100644 --- a/purchases_test.go +++ b/purchases_test.go @@ -8,7 +8,7 @@ import ( "strconv" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) @@ -239,7 +239,7 @@ func NewTestPurchase() *recurly.Purchase { FirstName: "Benjamin", LastName: "Du Monde", Month: 12, - Number: 4111111111111111, + Number: "4111111111111111", State: "CA", Year: 2019, Zip: "94110", diff --git a/recurly.go b/recurly.go index bbc9168..dbe76ba 100644 --- a/recurly.go +++ b/recurly.go @@ -41,7 +41,7 @@ type Client struct { // userAgent sets the User-Agent header for requests so Recurly can // track usage of the client. - // See https://github.com/blacklightcms/recurly/issues/41 + // See https://github.com/autopilot3/recurly/issues/41 userAgent string // Client is the HTTP Client used to communicate with the API. @@ -329,7 +329,7 @@ func (r *response) parseClientError(v interface{}) error { // Any transaction errors return TransactionFailedError. if e.Transaction != nil || e.TransactionError != nil { - transFailedErr := &TransactionFailedError{ + transFailedErr := TransactionFailedError{ Response: r.Response, Transaction: e.Transaction, } @@ -437,7 +437,7 @@ type TransactionFailedError struct { TransactionError TransactionError } -func (e *TransactionFailedError) Error() string { +func (e TransactionFailedError) Error() string { return fmt.Sprintf("transaction failed: %s %s: %d [%s/%s/%s]", e.Response.Request.Method, e.Response.Request.URL.Path, diff --git a/recurly_test.go b/recurly_test.go index 4a0b342..079bbd4 100644 --- a/recurly_test.go +++ b/recurly_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) @@ -334,7 +334,7 @@ func TestClient_TransactionFailedError(t *testing.T) { t.Fatal("expected invocation") } else if err == nil { t.Fatal(err) - } else if e, ok := err.(*recurly.TransactionFailedError); !ok { + } else if e, ok := err.(recurly.TransactionFailedError); !ok { t.Fatalf("unexpected error: %T %#v", err, err) } else if e.Response == nil { t.Fatal("expected *http.Response") diff --git a/redemptions_test.go b/redemptions_test.go index b23bff6..e6b4e08 100644 --- a/redemptions_test.go +++ b/redemptions_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) diff --git a/shipping_addresses_test.go b/shipping_addresses_test.go index 02f9b79..aa86bd7 100644 --- a/shipping_addresses_test.go +++ b/shipping_addresses_test.go @@ -6,7 +6,7 @@ import ( "net/http" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) diff --git a/shipping_methods_test.go b/shipping_methods_test.go index 4ec9767..0116a8a 100644 --- a/shipping_methods_test.go +++ b/shipping_methods_test.go @@ -6,7 +6,7 @@ import ( "net/http" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) diff --git a/subscriptions.go b/subscriptions.go index 45aec1f..a26791f 100644 --- a/subscriptions.go +++ b/subscriptions.go @@ -177,7 +177,7 @@ type NewSubscription struct { RenewalBillingCycles NullInt `xml:"renewal_billing_cycles"` NextBillDate NullTime `xml:"next_bill_date,omitempty"` CollectionMethod string `xml:"collection_method,omitempty"` - AutoRenew bool `xml:"auto_renew,omitempty"` + AutoRenew NullBool `xml:"auto_renew,omitempty"` NetTerms NullInt `xml:"net_terms,omitempty"` PONumber string `xml:"po_number,omitempty"` Bulk bool `xml:"bulk,omitempty"` @@ -498,8 +498,8 @@ func (s *subscriptionsImpl) Pause(ctx context.Context, uuid string, cycles int) func (s *subscriptionsImpl) Postpone(ctx context.Context, uuid string, dt time.Time, bulk bool) (*Subscription, error) { path := fmt.Sprintf("/subscriptions/%s/postpone", sanitizeUUID(uuid)) req, err := s.client.newQueryRequest("PUT", path, query{ - "bulk": bulk, - "next_renewal_date": dt, + "bulk": bulk, + "next_bill_date": dt, }, nil) if err != nil { return nil, err diff --git a/subscriptions_test.go b/subscriptions_test.go index 611f629..ca14ceb 100644 --- a/subscriptions_test.go +++ b/subscriptions_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) @@ -33,7 +33,7 @@ func TestSubscriptions_NewSubscription_Encoding(t *testing.T) { { v: recurly.NewSubscription{ PlanCode: "gold", - AutoRenew: true, + AutoRenew: recurly.NewBool(true), RenewalBillingCycles: recurly.NewInt(2), Account: recurly.Account{ Code: "123", @@ -1010,7 +1010,7 @@ func TestSubscriptions_Postpone(t *testing.T) { defer s.Close() s.HandleFunc("PUT", "/v2/subscriptions/44f83d7cba354d5b84812419f923ea96/postpone", func(w http.ResponseWriter, r *http.Request) { - if v := r.URL.Query().Get("next_renewal_date"); v != "2015-08-27T07:00:00Z" { + if v := r.URL.Query().Get("next_bill_date"); v != "2015-08-27T07:00:00Z" { t.Fatalf("unexpected input for next_renewal_date: %q", v) } else if v := r.URL.Query().Get("bulk"); v != "false" { t.Fatalf("unexpected input for bulk: %q", v) diff --git a/transactions_test.go b/transactions_test.go index a92e183..af74575 100644 --- a/transactions_test.go +++ b/transactions_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" ) diff --git a/webhooks/accounts.go b/webhooks/accounts.go index 2facca9..6e34a27 100644 --- a/webhooks/accounts.go +++ b/webhooks/accounts.go @@ -10,6 +10,7 @@ const ( CanceledAccount = "canceled_account_notification" BillingInfoUpdated = "billing_info_updated_notification" BillingInfoUpdateFailed = "billing_info_update_failed_notification" + NewShippingAddress = "new_shipping_address_notification" ) // AccountNotification is returned for all account notifications. diff --git a/webhooks/charge_invoices.go b/webhooks/charge_invoices.go index 5716d4c..0de389b 100644 --- a/webhooks/charge_invoices.go +++ b/webhooks/charge_invoices.go @@ -3,18 +3,23 @@ package webhooks import ( "encoding/xml" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) // Charge invoice notifications. // https://dev.recurly.com/page/webhooks#charge-invoice-notifications const ( - NewChargeInvoice = "new_charge_invoice_notification" - ProcessingChargeInvoice = "processing_charge_invoice_notification" - PastDueChargeInvoice = "past_due_charge_invoice_notification" - PaidChargeInvoice = "paid_charge_invoice_notification" - FailedChargeInvoice = "failed_charge_invoice_notification" - ReopenedChargeInvoice = "reopened_charge_invoice_notification" + NewChargeInvoice = "new_charge_invoice_notification" + ProcessingChargeInvoice = "processing_charge_invoice_notification" + PastDueInvoice = "past_due_invoice_notification" + PastDueChargeInvoice = "past_due_charge_invoice_notification" + PaidChargeInvoice = "paid_charge_invoice_notification" + FailedChargeInvoice = "failed_charge_invoice_notification" + ReopenedChargeInvoice = "reopened_charge_invoice_notification" + ClosedInvoiceNotification = "closed_invoice_notification" + UpdatedInvoiceNotification = "updated_invoice_notification" + UpdatedChargeInvoiceNotification = "updated_charge_invoice_notification" + PendingInvoiceNotification = "pending_invoice_notification" ) // ChargeInvoiceNotification is returned for all charge invoice notifications. diff --git a/webhooks/credit_invoices.go b/webhooks/credit_invoices.go index 6160502..1ffcf64 100644 --- a/webhooks/credit_invoices.go +++ b/webhooks/credit_invoices.go @@ -3,13 +3,14 @@ package webhooks import ( "encoding/xml" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) // Credit invoice notifications. // https://dev.recurly.com/page/webhooks#charge-invoice-notifications const ( NewCreditInvoice = "new_credit_invoice_notification" + UpdatedCreditInvoice = "updated_credit_invoice_notification" ProcessingCreditInvoice = "processing_credit_invoice_notification" ClosedCreditInvoice = "closed_credit_invoice_notification" VoidedCreditInvoice = "voided_credit_invoice_notification" diff --git a/webhooks/credit_payments.go b/webhooks/credit_payments.go index 78df0cb..bd3879b 100644 --- a/webhooks/credit_payments.go +++ b/webhooks/credit_payments.go @@ -3,7 +3,7 @@ package webhooks import ( "encoding/xml" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) // Credit payment notifications. diff --git a/webhooks/dunning_events.go b/webhooks/dunning_events.go index f89dbdd..e07f178 100644 --- a/webhooks/dunning_events.go +++ b/webhooks/dunning_events.go @@ -1,6 +1,6 @@ package webhooks -import "github.com/blacklightcms/recurly" +import "github.com/autopilot3/recurly" // Dunning event constants. const ( diff --git a/webhooks/payments.go b/webhooks/payments.go index 8887e0e..1c4a719 100644 --- a/webhooks/payments.go +++ b/webhooks/payments.go @@ -3,7 +3,7 @@ package webhooks import ( "encoding/xml" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" ) // Payment notifications. diff --git a/webhooks/pre_renewal_notification.go b/webhooks/pre_renewal_notification.go new file mode 100644 index 0000000..b1e0109 --- /dev/null +++ b/webhooks/pre_renewal_notification.go @@ -0,0 +1,14 @@ +package webhooks + +import "github.com/autopilot3/recurly" + +const ( + PreRenewal = "prerenewal_notification" +) + +// NewDunningEventNotification is returned for new dunning events. +type PreRenewalNotification struct { + Type string `xml:"-"` + Account Account + Subscription recurly.Subscription +} diff --git a/webhooks/subscriptions.go b/webhooks/subscriptions.go index 5bf3907..3454370 100644 --- a/webhooks/subscriptions.go +++ b/webhooks/subscriptions.go @@ -1,22 +1,23 @@ package webhooks -import "github.com/blacklightcms/recurly" +import "github.com/autopilot3/recurly" // Subscription notifications. // https://dev.recurly.com/page/webhooks#subscription-notifications const ( - NewSubscription = "new_subscription_notification" - UpdatedSubscription = "updated_subscription_notification" - RenewedSubscription = "renewed_subscription_notification" - ExpiredSubscription = "expired_subscription_notification" - CanceledSubscription = "canceled_subscription_notification" - PausedSubscription = "subscription_paused_notification" - ResumedSubscription = "subscription_resumed_notification" - ScheduledPauseSubscription = "scheduled_subscription_pause_notification" - ModifiedPauseSubscription = "subscription_pause_modified_notification" - PausedRenewalSubscription = "paused_subscription_renewal_notification" - PauseCanceledSubscription = "subscription_pause_canceled_notification" - ReactivatedAccount = "reactivated_account_notification" + NewSubscription = "new_subscription_notification" + UpdatedSubscription = "updated_subscription_notification" + RenewedSubscription = "renewed_subscription_notification" + ExpiredSubscription = "expired_subscription_notification" + CanceledSubscription = "canceled_subscription_notification" + PausedSubscription = "subscription_paused_notification" + ResumedSubscription = "subscription_resumed_notification" + ScheduledPauseSubscription = "scheduled_subscription_pause_notification" + ScheduledSubscriptionUpdate = "scheduled_subscription_update_notification" + ModifiedPauseSubscription = "subscription_pause_modified_notification" + PausedRenewalSubscription = "paused_subscription_renewal_notification" + PauseCanceledSubscription = "subscription_pause_canceled_notification" + ReactivatedAccount = "reactivated_account_notification" ) // SubscriptionNotification is returned for all subscription notifications. diff --git a/webhooks/webhooks.go b/webhooks/webhooks.go index 0bd3351..6c0158c 100644 --- a/webhooks/webhooks.go +++ b/webhooks/webhooks.go @@ -50,14 +50,14 @@ func Parse(r io.Reader) (interface{}, error) { // nameToNotification returns the notification interface. func nameToNotification(name string) (interface{}, error) { switch name { - case BillingInfoUpdated, NewAccount, UpdatedAccount, CanceledAccount, BillingInfoUpdateFailed: + case BillingInfoUpdated, NewAccount, UpdatedAccount, CanceledAccount, BillingInfoUpdateFailed, NewShippingAddress: return &AccountNotification{Type: name}, nil case NewSubscription, UpdatedSubscription, RenewedSubscription, ExpiredSubscription, CanceledSubscription, ReactivatedAccount, PausedSubscription, - ResumedSubscription, ScheduledPauseSubscription, ModifiedPauseSubscription, PausedRenewalSubscription, PauseCanceledSubscription: + ResumedSubscription, ScheduledPauseSubscription, ScheduledSubscriptionUpdate, ModifiedPauseSubscription, PausedRenewalSubscription, PauseCanceledSubscription: return &SubscriptionNotification{Type: name}, nil - case NewChargeInvoice, ProcessingChargeInvoice, PastDueChargeInvoice, PaidChargeInvoice, FailedChargeInvoice, ReopenedChargeInvoice: + case NewChargeInvoice, ProcessingChargeInvoice, PastDueChargeInvoice, PastDueInvoice, PaidChargeInvoice, FailedChargeInvoice, ReopenedChargeInvoice, ClosedInvoiceNotification, UpdatedInvoiceNotification, UpdatedChargeInvoiceNotification, PendingInvoiceNotification: return &ChargeInvoiceNotification{Type: name}, nil - case NewCreditInvoice, ProcessingCreditInvoice, ClosedCreditInvoice, VoidedCreditInvoice, ReopenedCreditInvoice, OpenCreditInvoice: + case NewCreditInvoice, UpdatedCreditInvoice, ProcessingCreditInvoice, ClosedCreditInvoice, VoidedCreditInvoice, ReopenedCreditInvoice, OpenCreditInvoice: return &CreditInvoiceNotification{Type: name}, nil case NewCreditPayment, VoidedCreditPayment: return &CreditPaymentNotification{Type: name}, nil @@ -65,6 +65,8 @@ func nameToNotification(name string) (interface{}, error) { return &PaymentNotification{Type: name}, nil case NewDunningEvent: return &NewDunningEventNotification{Type: name}, nil + case PreRenewal: + return &PreRenewalNotification{Type: name}, nil } return nil, ErrUnknownNotification{name: name} } diff --git a/webhooks/webhooks_test.go b/webhooks/webhooks_test.go index fcc33b8..031fa6d 100644 --- a/webhooks/webhooks_test.go +++ b/webhooks/webhooks_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/blacklightcms/recurly" - "github.com/blacklightcms/recurly/webhooks" + "github.com/autopilot3/recurly" + "github.com/autopilot3/recurly/webhooks" "github.com/google/go-cmp/cmp" ) diff --git a/xml_test.go b/xml_test.go index 8fa28ba..b49991c 100644 --- a/xml_test.go +++ b/xml_test.go @@ -5,7 +5,7 @@ import ( "encoding/xml" "testing" - "github.com/blacklightcms/recurly" + "github.com/autopilot3/recurly" "github.com/google/go-cmp/cmp" )