Skip to content

Add support for Billing endpoints#443

Merged
mauricioabreu merged 19 commits intov2from
mauricio-antunes/bill-1226-update-go-sdk-with-billing-endpoints
Sep 25, 2025
Merged

Add support for Billing endpoints#443
mauricioabreu merged 19 commits intov2from
mauricio-antunes/bill-1226-update-go-sdk-with-billing-endpoints

Conversation

@mauricioabreu
Copy link
Copy Markdown
Contributor

@mauricioabreu mauricioabreu commented Sep 9, 2025

  • List plans
  • Extend Free Trials
  • List Subscription Items
  • Cancel Subscription Item

@mauricioabreu mauricioabreu force-pushed the mauricio-antunes/bill-1226-update-go-sdk-with-billing-endpoints branch 2 times, most recently from a80ceae to 1b5d4cf Compare September 9, 2025 20:24
@mauricioabreu mauricioabreu marked this pull request as ready for review September 9, 2025 20:40
@mauricioabreu mauricioabreu requested a review from a team as a code owner September 9, 2025 20:40
@NicolasLopes7
Copy link
Copy Markdown
Contributor

You also probably want to open this PR pointing to the v3 branch (plus v2)

@mauricioabreu mauricioabreu force-pushed the mauricio-antunes/bill-1226-update-go-sdk-with-billing-endpoints branch from 01c2f78 to 22831da Compare September 14, 2025 12:28
Copy link
Copy Markdown
Contributor

@paddycarver paddycarver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming those tests are following the pattern for other tests in this repo?

@mauricioabreu
Copy link
Copy Markdown
Contributor Author

@paddycarver

I'm assuming those tests are following the pattern for other tests in this repo?

Yes, they are.

@mauricioabreu mauricioabreu enabled auto-merge (squash) September 24, 2025 22:47
Copy link
Copy Markdown
Contributor

@paddycarver paddycarver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type system nitpicks, feel free to use your judgment on whether to block on them or not.

Object string `json:"object"`
ID string `json:"id"`
Name string `json:"name"`
Fee *BillingMoney `json:"fee"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we always have a Fee and only sometimes have an annual fee? Or are there times where we may not have a fee, like the default free plan? 🤔

Comment on lines +101 to +102
Amount *BillingMoney `json:"amount"`
Date *int64 `json:"date"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will these items ever not be set when the outer struct is present?

@mauricioabreu mauricioabreu enabled auto-merge (squash) September 25, 2025 03:00
@mauricioabreu mauricioabreu enabled auto-merge (squash) September 25, 2025 03:00
@mauricioabreu mauricioabreu force-pushed the mauricio-antunes/bill-1226-update-go-sdk-with-billing-endpoints branch from eb56983 to 1d64f3f Compare September 25, 2025 03:07
@mauricioabreu mauricioabreu merged commit ea784f5 into v2 Sep 25, 2025
8 checks passed
@mauricioabreu mauricioabreu deleted the mauricio-antunes/bill-1226-update-go-sdk-with-billing-endpoints branch September 25, 2025 03:07
@mauricioabreu mauricioabreu restored the mauricio-antunes/bill-1226-update-go-sdk-with-billing-endpoints branch September 25, 2025 03:11
@mauricioabreu mauricioabreu deleted the mauricio-antunes/bill-1226-update-go-sdk-with-billing-endpoints branch September 25, 2025 03:13
mauricioabreu added a commit that referenced this pull request Sep 25, 2025
* Add support for Billing endpoints

* refactor: Rename commerce -> billing

* fix: make PlanID nullable to support planless subs

* refactor: remove unused struct

* fix: we will be using PaymentMethod from now on

* refactor: remove deprecated fields

* refactor: remove deprecated invoice field

* refactor: omitempty is useless when unmarshalling

* refactor: query strings don't need omitempty

* fix: several fix related to JSON tags

* test: fix after struct changes

* fix: Remove PayerType array

* fix: we are not returning null features

Co-authored-by: Paddy <paddy@carvers.com>

* fix: we are not returning null plans

Co-authored-by: Paddy <paddy@carvers.com>

* fix: we are not returning null subscription items

Co-authored-by: Paddy <paddy@carvers.com>

* fix: we are not returning null plans

Co-authored-by: Paddy <paddy@carvers.com>

* fix: remove currency deprecated fields

* test: fix

* fix: period_start cannot be null

---------

Co-authored-by: Paddy <paddy@carvers.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants