feat: adds ApplicationContext support

This commit is contained in:
Vincent Biret-Chaussat 2018-08-28 10:43:53 +01:00
parent af41710b9d
commit 174211b78b
No known key found for this signature in database
GPG Key ID: 5B4A195C0CE5469A

View File

@ -93,6 +93,15 @@ type (
Value string `json:"value"` Value string `json:"value"`
} }
// ApplicationContext struct
ApplicationContext struct {
BrandName string `json:"brand_name"`
Locale string `json:"locale"`
LandingPage string `json:"landing_page"`
ShippingPreference string `json:"shipping_preference"`
UserAction string `json:"user_action"`
}
// Authorization struct // Authorization struct
Authorization struct { Authorization struct {
Amount *Amount `json:"amount,omitempty"` Amount *Amount `json:"amount,omitempty"`
@ -232,6 +241,7 @@ type (
GiftWrap string `json:"gift_wrap,omitempty"` GiftWrap string `json:"gift_wrap,omitempty"`
} }
// ErrorResponseDetail struct
ErrorResponseDetail struct { ErrorResponseDetail struct {
Field string `json:"field"` Field string `json:"field"`
Issue string `json:"issue"` Issue string `json:"issue"`
@ -346,15 +356,16 @@ type (
// Payment struct // Payment struct
Payment struct { Payment struct {
Intent string `json:"intent"` Intent string `json:"intent"`
Payer *Payer `json:"payer"` Payer *Payer `json:"payer"`
Transactions []Transaction `json:"transactions"` ApplicationContext *ApplicationContext `json:"application_context,omitempty"`
RedirectURLs *RedirectURLs `json:"redirect_urls,omitempty"` Transactions []Transaction `json:"transactions"`
ID string `json:"id,omitempty"` RedirectURLs *RedirectURLs `json:"redirect_urls,omitempty"`
CreateTime *time.Time `json:"create_time,omitempty"` ID string `json:"id,omitempty"`
State string `json:"state,omitempty"` CreateTime *time.Time `json:"create_time,omitempty"`
UpdateTime *time.Time `json:"update_time,omitempty"` State string `json:"state,omitempty"`
ExperienceProfileID string `json:"experience_profile_id,omitempty"` UpdateTime *time.Time `json:"update_time,omitempty"`
ExperienceProfileID string `json:"experience_profile_id,omitempty"`
} }
// PaymentDefinition struct // PaymentDefinition struct
@ -369,6 +380,7 @@ type (
ChargeModels []ChargeModel `json:"charge_models,omitempty"` ChargeModels []ChargeModel `json:"charge_models,omitempty"`
} }
// PaymentOptions struct
PaymentOptions struct { PaymentOptions struct {
AllowedPaymentMethod string `json:"allowed_payment_method,omitempty"` AllowedPaymentMethod string `json:"allowed_payment_method,omitempty"`
} }
@ -548,7 +560,6 @@ type (
WebProfile struct { WebProfile struct {
ID string `json:"id,omitempty"` ID string `json:"id,omitempty"`
Name string `json:"name"` Name string `json:"name"`
Temporary bool `json:"temporary"`
Presentation Presentation `json:"presentation,omitempty"` Presentation Presentation `json:"presentation,omitempty"`
InputFields InputFields `json:"input_fields,omitempty"` InputFields InputFields `json:"input_fields,omitempty"`
FlowConfig FlowConfig `json:"flow_config,omitempty"` FlowConfig FlowConfig `json:"flow_config,omitempty"`