Skip to content

Commit

Permalink
Added missing BillingAgreementId key in webhook (#205)
Browse files Browse the repository at this point in the history
* Added missing BillingAgreementId key in webhook

Webhook resource contains `billing_agreement_id`. Exists in type: `PAYMENT.SALE.COMPLETED` when a subscription is paid.

* review fix
  • Loading branch information
mgorunuch committed Jul 14, 2021
1 parent 392c0e9 commit 7f2eec9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions types.go
Expand Up @@ -1150,6 +1150,7 @@ type (
PartnerClientID string `json:"partner_client_id,omitempty"`
MerchantID string `json:"merchant_id,omitempty"`
Intent string `json:"intent,omitempty"`
BillingAgreementID *string `json:"billing_agreement_id,omitempty"`

This comment has been minimized.

Copy link
@thomasf

thomasf Jul 14, 2021

Contributor

this should not go into the general resource,, all evet types are not related to billing. There sould probably be a lot less fields in this struct

This comment has been minimized.

Copy link
@thomasf

thomasf Jul 14, 2021

Contributor

forget it., I read the code wrong. A generic name "Resource" for a specific resource type (payment) tripped me up.

PurchaseUnits []*PurchaseUnitRequest `json:"purchase_units,omitempty"`
Payer *PayerWithNameAndPhone `json:"payer,omitempty"`
Links []Link `json:"links,omitempty"`
Expand Down

0 comments on commit 7f2eec9

Please sign in to comment.