Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
feat: create RentalTransactionEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
justinemmanuelmercado committed Jun 19, 2020
1 parent de22e6d commit 5455c7c
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions src/sections/finances/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,31 @@ const RetrochargeEvent = Codec.interface({
ensureArray('TaxWithheldComponent', TaxWithheldComponent),
),
})
/**
* @todo
*/
const RentalTransactionEvent = unknown

enum RentalEventTypeEnum {
'RentalCustomerPayment-Buyout' = 'RentalCustomerPayment-Buyout',
'RentalCustomerPayment-Extension' = 'RentalCustomerPayment-Extension',
'RentalCustomerRefund-Buyout' = 'RentalCustomerRefund-Buyout',
'RentalCustomerRefund-Extension' = 'RentalCustomerRefund-Extension',
RentalHandlingFee = 'RentalHandlingFee',
RentalChargeFailureReimbursement = 'RentalChargeFailureReimbursement',
RentalLostItemReimbursement = 'RentalLostItemReimbursement',
}

const RentalEventType = enumeration(RentalEventTypeEnum)

const RentalTransactionEvent = Codec.interface({
AmazonOrderId: optional(ensureString),
RentalEventType: optional(RentalEventType),
ExtensionLength: optional(number),
PostedDate: optional(mwsDate),
RentalChargeList: optional(ensureArray('ChargeComponent', ChargeComponent)),
RentalFeeList: optional(ensureArray('FeeComponent', FeeComponent)),
MarketplaceName: optional(string),
RentalInitialValue: optional(CurrencyAmount),
RentalReimbursement: optional(CurrencyAmount),
RentalTaxWithheldList: optional(TaxWithheldComponent),
})
/**
* @todo
*/
Expand Down

0 comments on commit 5455c7c

Please sign in to comment.