Add support for SellerReceivableBreakdown (#178)

* Add support for SellerReceivableBreakdown

https://developer.paypal.com/docs/api/orders/v2/#orders_capture

* Update types.go

* Update types.go
This commit is contained in:
yunuseskisan 2020-10-23 08:52:58 +01:00 committed by GitHub
parent 289b2669ef
commit d1e5575c35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -590,11 +590,32 @@ type (
UpdateTime *time.Time `json:"update_time,omitempty"`
}
// ExchangeRate struct
//
// https://developer.paypal.com/docs/api/orders/v2/#definition-exchange_rate
ExchangeRate struct {
SourceCurrency string `json:"source_currency"`
TargetCurrency string `json:"target_currency"`
Value string `json:"value"`
}
// SellerReceivableBreakdown has the detailed breakdown of the capture activity.
SellerReceivableBreakdown struct {
GrossAmount *Money `json:"gross_amount,omitempty"`
PaypalFee *Money `json:"paypal_fee,omitempty"`
PaypalFeeInReceivableCurrency *Money `json:"paypal_fee_in_receivable_currency,omitempty"`
NetAmount *Money `json:"net_amount,omitempty"`
ReceivableAmount *Money `json:"receivable_amount,omitempty"`
ExchangeRate *ExchangeRate `json:"exchange_rate,omitempty"`
PlatformFees []PlatformFee `json:"platform_fees,omitempty"`
}
// CaptureAmount struct
CaptureAmount struct {
ID string `json:"id,omitempty"`
CustomID string `json:"custom_id,omitempty"`
Amount *PurchaseUnitAmount `json:"amount,omitempty"`
ID string `json:"id,omitempty"`
CustomID string `json:"custom_id,omitempty"`
Amount *PurchaseUnitAmount `json:"amount,omitempty"`
SellerReceivableBreakdown *SellerReceivableBreakdown `json:"seller_receivable_breakdown,omitempty"`
}
// CapturedPayments has the amounts for a captured order