File size: 2,136 Bytes
83a59ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package responses

import (
	"time"

	"github.com/NdoleStudio/httpsms/pkg/entities"
)

// UserResponse is the payload containing entities.User
type UserResponse struct {
	response
	Data entities.User `json:"data"`
}

// UserSubscriptionPaymentsResponse is the payload containing lemonsqueezy.SubscriptionInvoicesAPIResponse
type UserSubscriptionPaymentsResponse struct {
	response
	Data []struct {
		Type       string `json:"type"`
		ID         string `json:"id"`
		Attributes struct {
			BillingReason           string    `json:"billing_reason"`
			CardBrand               string    `json:"card_brand"`
			CardLastFour            string    `json:"card_last_four"`
			Currency                string    `json:"currency"`
			CurrencyRate            string    `json:"currency_rate"`
			Status                  string    `json:"status"`
			StatusFormatted         string    `json:"status_formatted"`
			Refunded                bool      `json:"refunded"`
			RefundedAt              any       `json:"refunded_at"`
			Subtotal                int       `json:"subtotal"`
			DiscountTotal           int       `json:"discount_total"`
			Tax                     int       `json:"tax"`
			TaxInclusive            bool      `json:"tax_inclusive"`
			Total                   int       `json:"total"`
			RefundedAmount          int       `json:"refunded_amount"`
			SubtotalUsd             int       `json:"subtotal_usd"`
			DiscountTotalUsd        int       `json:"discount_total_usd"`
			TaxUsd                  int       `json:"tax_usd"`
			TotalUsd                int       `json:"total_usd"`
			RefundedAmountUsd       int       `json:"refunded_amount_usd"`
			SubtotalFormatted       string    `json:"subtotal_formatted"`
			DiscountTotalFormatted  string    `json:"discount_total_formatted"`
			TaxFormatted            string    `json:"tax_formatted"`
			TotalFormatted          string    `json:"total_formatted"`
			RefundedAmountFormatted string    `json:"refunded_amount_formatted"`
			CreatedAt               time.Time `json:"created_at"`
			UpdatedAt               time.Time `json:"updated_at"`
		} `json:"attributes"`
	} `json:"data"`
}