Skip to content

Commit

Permalink
Merge pull request #27 from paulrouge/main
Browse files Browse the repository at this point in the history
Add SubscriptionID to Subscription struct
  • Loading branch information
AchoArnold authored Sep 26, 2024
2 parents e8ef769 + a02467f commit 9949182
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/stubs/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func SubscriptionGetResponse() []byte {
"id": "1",
"attributes": {
"store_id": 1,
"subscription_id": 1,
"customer_id": 1,
"order_id": 1,
"order_item_id": 1,
Expand Down Expand Up @@ -387,6 +388,7 @@ func SubscriptionCancelResponse() []byte {
"id": "1",
"attributes": {
"store_id": 1,
"subscription_id": 1,
"customer_id": 1,
"order_id": 1,
"order_item_id": 1,
Expand Down
1 change: 1 addition & 0 deletions subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "time"
// https://docs.lemonsqueezy.com/api/subscriptions#the-subscription-object
type Subscription struct {
StoreID int `json:"store_id"`
SubscriptionID int `json:"subscription_id"`
CustomerID int `json:"customer_id"`
OrderID int `json:"order_id"`
OrderItemID int `json:"order_item_id"`
Expand Down
2 changes: 2 additions & 0 deletions subscriptions_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func TestSubscriptionsService_Get(t *testing.T) {
ID: "1",
Attributes: Subscription{
StoreID: 1,
SubscriptionID: 1,
CustomerID: 1,
OrderID: 1,
OrderItemID: 1,
Expand Down Expand Up @@ -186,6 +187,7 @@ func TestSubscriptionsService_Cancel(t *testing.T) {
ID: "1",
Attributes: Subscription{
StoreID: 1,
SubscriptionID: 1,
CustomerID: 1,
OrderID: 1,
OrderItemID: 1,
Expand Down

0 comments on commit 9949182

Please sign in to comment.