Skip to content

Commit

Permalink
chore(fixture) fix fee attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed Oct 16, 2023
1 parent 6cbc146 commit d7f8771
Showing 1 changed file with 52 additions and 7 deletions.
59 changes: 52 additions & 7 deletions src/hooks/__tests__/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const fullSubscriptionInvoiceMockAndExpect = () => ({
amountCurrency: 'EUR',
itemCode: 'standard_plan',
itemName: 'Standard Plan',
invoiceName: 'Invoice custom name',
creditableAmountCents: '100',
appliedTaxes: [],
trueUpFee: null,
Expand All @@ -48,6 +49,7 @@ export const fullSubscriptionInvoiceMockAndExpect = () => ({
amountCurrency: 'EUR',
itemCode: 'sum_bm',
itemName: 'Sum BM',
invoiceName: 'Invoice custom name',
creditableAmountCents: '2699900',
appliedTaxes: [],
trueUpFee: null,
Expand All @@ -73,6 +75,8 @@ export const fullSubscriptionInvoiceMockAndExpect = () => ({
amountCurrency: 'EUR',
feeType: 'subscription',
appliedTaxes: [],
invoiceName: 'Invoice custom name',
groupName: 'group 1 custom name',
creditableAmountCents: '100',
trueUpFee: null,
charge: null,
Expand All @@ -84,6 +88,8 @@ export const fullSubscriptionInvoiceMockAndExpect = () => ({
amountCurrency: 'EUR',
feeType: 'charge',
appliedTaxes: [],
invoiceName: 'Invoice custom name',
groupName: 'group 1 custom name',
creditableAmountCents: '2699900',
trueUpFee: null,
charge: {
Expand Down Expand Up @@ -129,6 +135,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
itemCode: 'group_true_up',
itemName: 'group true up',
creditableAmountCents: '167',
invoiceName: 'Invoice custom name',
groupName: null,
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -139,6 +147,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
itemCode: 'count_bm_two_dimensions',
itemName: 'Count BM - Two dimensions',
creditableAmountCents: '3000',
invoiceName: 'Invoice custom name',
groupName: null,
appliedTaxes: [],
trueUpFee: {
id: 'af3ca6df-02ba-4442-a455-c7eb6b0edc6b',
Expand All @@ -152,6 +162,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
itemCode: 'count_bm_two_dimensions',
itemName: 'Count BM - Two dimensions',
creditableAmountCents: '2000',
invoiceName: 'Invoice custom name',
groupName: null,
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -162,6 +174,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
itemCode: 'count_bm_two_dimensions',
itemName: 'Count BM - Two dimensions',
creditableAmountCents: '1000',
invoiceName: 'Invoice custom name',
groupName: null,
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -172,6 +186,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
itemCode: 'count_bm_two_dimensions',
itemName: 'Count BM - Two dimensions',
creditableAmountCents: '10666',
invoiceName: 'Invoice custom name',
groupName: null,
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -182,6 +198,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
itemCode: 'count_bm_one_dimension',
itemName: 'Count BM - One dimension',
creditableAmountCents: '3000',
invoiceName: 'Invoice custom name',
groupName: null,
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -192,6 +210,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
itemCode: 'count_bm_one_dimension',
itemName: 'Count BM - One dimension',
creditableAmountCents: '3000',
invoiceName: 'Invoice custom name',
groupName: null,
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -202,6 +222,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
itemCode: 'sum_bm',
itemName: 'Sum BM',
creditableAmountCents: '40000',
invoiceName: 'Invoice custom name',
groupName: null,
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -212,6 +234,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
itemCode: 'sum_bm',
itemName: 'Sum BM',
creditableAmountCents: '0',
invoiceName: 'Invoice custom name',
groupName: null,
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -237,6 +261,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
feeType: 'subscription',
appliedTaxes: [],
creditableAmountCents: '167',
invoiceName: 'Invoice custom name',
groupName: null,
trueUpFee: null,
charge: null,
group: null,
Expand All @@ -248,6 +274,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
feeType: 'charge',
appliedTaxes: [],
creditableAmountCents: '3000',
invoiceName: 'Invoice custom name',
groupName: null,
trueUpFee: {
id: 'af3ca6df-02ba-4442-a455-c7eb6b0edc6b',
__typename: 'Fee',
Expand All @@ -274,6 +302,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
feeType: 'charge',
appliedTaxes: [],
creditableAmountCents: '2000',
invoiceName: 'Invoice custom name',
groupName: null,
trueUpFee: null,
charge: {
id: '5ff24500-2c67-4872-9808-746c59e94d38',
Expand All @@ -297,6 +327,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
feeType: 'charge',
appliedTaxes: [],
creditableAmountCents: '1000',
invoiceName: 'Invoice custom name',
groupName: null,
trueUpFee: null,
charge: {
id: '5ff24500-2c67-4872-9808-746c59e94d38',
Expand All @@ -320,6 +352,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
feeType: 'charge',
appliedTaxes: [],
creditableAmountCents: '10666',
invoiceName: 'Invoice custom name',
groupName: null,
trueUpFee: null,
charge: {
id: '5ff24500-2c67-4872-9808-746c59e94d38',
Expand All @@ -339,6 +373,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
feeType: 'charge',
appliedTaxes: [],
creditableAmountCents: '3000',
invoiceName: 'Invoice custom name',
groupName: null,
trueUpFee: null,
charge: {
id: '594fe1d1-69f1-4b47-8cae-9c76fd409f76',
Expand All @@ -362,6 +398,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
feeType: 'charge',
appliedTaxes: [],
creditableAmountCents: '3000',
invoiceName: 'Invoice custom name',
groupName: null,
trueUpFee: null,
charge: {
id: '594fe1d1-69f1-4b47-8cae-9c76fd409f76',
Expand All @@ -385,6 +423,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
feeType: 'charge',
appliedTaxes: [],
creditableAmountCents: '40000',
invoiceName: 'Invoice custom name',
groupName: null,
trueUpFee: null,
charge: {
id: '2030bb05-e627-40a5-b420-538fb6fbecab',
Expand All @@ -404,6 +444,8 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
feeType: 'charge',
appliedTaxes: [],
creditableAmountCents: '0',
invoiceName: 'Invoice custom name',
groupName: null,
trueUpFee: null,
charge: {
id: '2030bb05-e627-40a5-b420-538fb6fbecac',
Expand Down Expand Up @@ -440,7 +482,7 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
id: 'b7e53061-73b5-46bf-8f1a-2f49d50c672c',
isTrueUpFee: false,
maxAmount: '167',
name: 'Standard Plan',
name: 'Invoice custom name',
trueUpFee: null,
value: 1.67,
},
Expand All @@ -450,7 +492,7 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
id: 'af3ca6df-02ba-4442-a455-c7eb6b0edc6b',
isTrueUpFee: true,
maxAmount: '10666',
name: 'Count BM - Two dimensions',
name: 'Invoice custom name',
trueUpFee: null,
value: 106.66,
},
Expand All @@ -460,7 +502,7 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
id: '18892329-3951-4134-ac57-fe7233b1c723',
isTrueUpFee: false,
maxAmount: '40000',
name: 'Sum BM',
name: 'Invoice custom name',
trueUpFee: null,
value: 400,
},
Expand All @@ -483,7 +525,7 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
value: 30,
},
},
name: 'Count BM - One dimension',
name: 'Invoice custom name',
},
'5ff24500-2c67-4872-9808-746c59e94d38': {
grouped: {
Expand Down Expand Up @@ -512,7 +554,7 @@ export const fullSubscriptionInvoiceGroupTrueUpMockAndExpect = () => ({
value: 30,
},
},
name: 'Count BM - Two dimensions',
name: 'Invoice custom name',
},
},
subscriptionName: 'Standard Plan',
Expand All @@ -534,6 +576,7 @@ export const fullOneOffInvoiceMockAndExpect = () => ({
itemCode: 'standard_plan',
itemName: 'Standard Plan',
creditableAmountCents: '100',
invoiceName: 'Invoice custom name',
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -544,6 +587,7 @@ export const fullOneOffInvoiceMockAndExpect = () => ({
itemCode: 'sum_bm',
itemName: 'Sum BM',
creditableAmountCents: '0',
invoiceName: 'Invoice custom name',
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -554,6 +598,7 @@ export const fullOneOffInvoiceMockAndExpect = () => ({
itemCode: 'sum_bm',
itemName: 'Sum BM',
creditableAmountCents: '2699900',
invoiceName: 'Invoice custom name',
appliedTaxes: [],
trueUpFee: null,
__typename: 'Fee',
Expand All @@ -576,15 +621,15 @@ export const fullOneOffInvoiceMockAndExpect = () => ({
checked: true,
id: 'fee-1-id',
maxAmount: '100',
name: 'Standard Plan',
name: 'Invoice custom name',
value: 1,
},
{
appliedTaxes: [],
checked: true,
id: 'fee-3-id',
maxAmount: '2699900',
name: 'Sum BM',
name: 'Invoice custom name',
value: 26999,
},
],
Expand Down

0 comments on commit d7f8771

Please sign in to comment.