Merge pull request #53 from mizzy/omitempty-some-keys
Add "omitempty" to some keys which need not to be returned
This commit is contained in:
@@ -62,16 +62,16 @@ type (
|
|||||||
|
|
||||||
// The ExpiresDate type indicates the expiration date for the subscription
|
// The ExpiresDate type indicates the expiration date for the subscription
|
||||||
ExpiresDate struct {
|
ExpiresDate struct {
|
||||||
ExpiresDate string `json:"expires_date"`
|
ExpiresDate string `json:"expires_date,omitempty"`
|
||||||
ExpiresDateMS string `json:"expires_date_ms"`
|
ExpiresDateMS string `json:"expires_date_ms,omitempty"`
|
||||||
ExpiresDatePST string `json:"expires_date_pst"`
|
ExpiresDatePST string `json:"expires_date_pst,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// The CancellationDate type indicates the time and date of the cancellation by Apple customer support
|
// The CancellationDate type indicates the time and date of the cancellation by Apple customer support
|
||||||
CancellationDate struct {
|
CancellationDate struct {
|
||||||
CancellationDate string `json:"cancellation_date"`
|
CancellationDate string `json:"cancellation_date,omitempty"`
|
||||||
CancellationDateMS string `json:"cancellation_date_ms"`
|
CancellationDateMS string `json:"cancellation_date_ms,omitempty"`
|
||||||
CancellationDatePST string `json:"cancellation_date_pst"`
|
CancellationDatePST string `json:"cancellation_date_pst,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// The InApp type has the receipt attributes
|
// The InApp type has the receipt attributes
|
||||||
@@ -80,7 +80,7 @@ type (
|
|||||||
ProductID string `json:"product_id"`
|
ProductID string `json:"product_id"`
|
||||||
TransactionID string `json:"transaction_id"`
|
TransactionID string `json:"transaction_id"`
|
||||||
OriginalTransactionID string `json:"original_transaction_id"`
|
OriginalTransactionID string `json:"original_transaction_id"`
|
||||||
WebOrderLineItemID string `json:"web_order_line_item_id"`
|
WebOrderLineItemID string `json:"web_order_line_item_id,omitempty"`
|
||||||
|
|
||||||
IsTrialPeriod string `json:"is_trial_period"`
|
IsTrialPeriod string `json:"is_trial_period"`
|
||||||
ExpiresDate
|
ExpiresDate
|
||||||
@@ -89,7 +89,7 @@ type (
|
|||||||
OriginalPurchaseDate
|
OriginalPurchaseDate
|
||||||
|
|
||||||
CancellationDate
|
CancellationDate
|
||||||
CancellationReason string `json:"cancellation_reason"`
|
CancellationReason string `json:"cancellation_reason,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// The Receipt type has whole data of receipt
|
// The Receipt type has whole data of receipt
|
||||||
@@ -127,10 +127,10 @@ type (
|
|||||||
Status int `json:"status"`
|
Status int `json:"status"`
|
||||||
Environment Environment `json:"environment"`
|
Environment Environment `json:"environment"`
|
||||||
Receipt Receipt `json:"receipt"`
|
Receipt Receipt `json:"receipt"`
|
||||||
LatestReceiptInfo []InApp `json:"latest_receipt_info"`
|
LatestReceiptInfo []InApp `json:"latest_receipt_info,omitempty"`
|
||||||
LatestReceipt string `json:"latest_receipt"`
|
LatestReceipt string `json:"latest_receipt,omitempty"`
|
||||||
PendingRenewalInfo []PendingRenewalInfo `json:"pending_renewal_info"`
|
PendingRenewalInfo []PendingRenewalInfo `json:"pending_renewal_info,omitempty"`
|
||||||
IsRetryable bool `json:"is-retryable"`
|
IsRetryable bool `json:"is-retryable,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// The HttpStatusResponse struct contains the status code returned by the store
|
// The HttpStatusResponse struct contains the status code returned by the store
|
||||||
|
|||||||
Reference in New Issue
Block a user