Skip to content

Commit

Permalink
Added subscriptionID to transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
gee-m committed Sep 27, 2016
1 parent c972266 commit b619a5b
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,38 @@ import (
)

type Transaction struct {
XMLName string `xml:"transaction"`
Id string `xml:"id,omitempty"`
CustomerID string `xml:"customer-id,omitempty"`
Status string `xml:"status,omitempty"`
Type string `xml:"type,omitempty"`
Amount *Decimal `xml:"amount"`
CurrencyISOCode string `xml:"currency-iso-code,omitempty"`
Tax *Decimal `xml:"tax-amount"`
OrderId string `xml:"order-id,omitempty"`
PaymentMethodToken string `xml:"payment-method-token,omitempty"`
PaymentMethodNonce string `xml:"payment-method-nonce,omitempty"`
MerchantAccountId string `xml:"merchant-account-id,omitempty"`
PlanId string `xml:"plan-id,omitempty"`
CreditCard *CreditCard `xml:"credit-card,omitempty"`
Customer *Customer `xml:"customer,omitempty"`
BillingAddress *Address `xml:"billing,omitempty"`
ShippingAddress *Address `xml:"shipping,omitempty"`
Options *TransactionOptions `xml:"options,omitempty"`
ServiceFeeAmount *Decimal `xml:"service-fee-amount,attr,omitempty"`
CreatedAt *time.Time `xml:"created-at,omitempty"`
UpdatedAt *time.Time `xml:"updated-at,omitempty"`
DisbursementDetails *DisbursementDetails `xml:"disbursement-details,omitempty"`
RefundId string `xml:"refund-id,omitempty"`
RefundIds *[]string `xml:"refund-ids>item,omitempty"`
RefundedTransactionId *string `xml:"refunded-transaction-id,omitempty"`
ProcessorResponseCode int `xml:"processor-response-code,omitempty"`
ProcessorResponseText string `xml:"processor-response-text,omitempty"`
ProcessorAuthorizationCode string `xml:"processor-authorization-code,omitempty"`
SettlementBatchId string `xml:"settlement-batch-id,omitempty"`
XMLName string `xml:"transaction"`
Id string `xml:"id,omitempty"`
CustomerID string `xml:"customer-id,omitempty"`
Status string `xml:"status,omitempty"`
Type string `xml:"type,omitempty"`
Amount *Decimal `xml:"amount"`
CurrencyISOCode string `xml:"currency-iso-code,omitempty"`
Tax *Decimal `xml:"tax-amount"`
OrderId string `xml:"order-id,omitempty"`
PaymentMethodToken string `xml:"payment-method-token,omitempty"`
PaymentMethodNonce string `xml:"payment-method-nonce,omitempty"`
MerchantAccountId string `xml:"merchant-account-id,omitempty"`
PlanId string `xml:"plan-id,omitempty"`
CreditCard *CreditCard `xml:"credit-card,omitempty"`
Customer *Customer `xml:"customer,omitempty"`
BillingAddress *Address `xml:"billing,omitempty"`
ShippingAddress *Address `xml:"shipping,omitempty"`
Options *TransactionOptions `xml:"options,omitempty"`
ServiceFeeAmount *Decimal `xml:"service-fee-amount,attr,omitempty"`
CreatedAt *time.Time `xml:"created-at,omitempty"`
UpdatedAt *time.Time `xml:"updated-at,omitempty"`
DisbursementDetails *DisbursementDetails `xml:"disbursement-details,omitempty"`

RefundId string `xml:"refund-id,omitempty"`
RefundIds *[]string `xml:"refund-ids>item,omitempty"`
RefundedTransactionId *string `xml:"refunded-transaction-id,omitempty"`
ProcessorResponseCode int `xml:"processor-response-code,omitempty"`
ProcessorResponseText string `xml:"processor-response-text,omitempty"`
ProcessorAuthorizationCode string `xml:"processor-authorization-code,omitempty"`
SettlementBatchId string `xml:"settlement-batch-id,omitempty"`

SubscriptionID string `xml:"subscription-id,omitempty"`
}

// TODO: not all transaction fields are implemented yet, here are the missing fields (add on demand)
Expand Down

0 comments on commit b619a5b

Please sign in to comment.