Skip to content

Commit

Permalink
feat(core): Implement tax on shipping
Browse files Browse the repository at this point in the history
Relates to #54
  • Loading branch information
michaelbromley committed May 8, 2019
1 parent f61ea11 commit 1b13aa3
Show file tree
Hide file tree
Showing 21 changed files with 173 additions and 145 deletions.
76 changes: 40 additions & 36 deletions admin-ui/src/app/common/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1414,12 +1414,12 @@ export type Mutation = {
assignRoleToAdministrator: Administrator,
/** Create a new Asset */
createAssets: Array<Asset>,
login: LoginResult,
logout: Scalars['Boolean'],
/** Create a new Channel */
createChannel: Channel,
/** Update an existing Channel */
updateChannel: Channel,
login: LoginResult,
logout: Scalars['Boolean'],
/** Create a new Collection */
createCollection: Collection,
/** Update an existing Collection */
Expand Down Expand Up @@ -1472,7 +1472,6 @@ export type Mutation = {
createProductOptionGroup: ProductOptionGroup,
/** Update an existing ProductOptionGroup */
updateProductOptionGroup: ProductOptionGroup,
reindex: SearchReindexResponse,
/** Create a new Product */
createProduct: Product,
/** Update an existing Product */
Expand All @@ -1487,21 +1486,22 @@ export type Mutation = {
generateVariantsForProduct: Product,
/** Update existing ProductVariants */
updateProductVariants: Array<Maybe<ProductVariant>>,
reindex: SearchReindexResponse,
createPromotion: Promotion,
updatePromotion: Promotion,
deletePromotion: DeletionResponse,
/** Create a new Role */
createRole: Role,
/** Update an existing Role */
updateRole: Role,
/** Create a new ShippingMethod */
createShippingMethod: ShippingMethod,
/** Update an existing ShippingMethod */
updateShippingMethod: ShippingMethod,
/** Create a new TaxCategory */
createTaxCategory: TaxCategory,
/** Update an existing TaxCategory */
updateTaxCategory: TaxCategory,
/** Create a new ShippingMethod */
createShippingMethod: ShippingMethod,
/** Update an existing ShippingMethod */
updateShippingMethod: ShippingMethod,
/** Create a new TaxRate */
createTaxRate: TaxRate,
/** Update an existing TaxRate */
Expand Down Expand Up @@ -1545,13 +1545,6 @@ export type MutationCreateAssetsArgs = {
};


export type MutationLoginArgs = {
username: Scalars['String'],
password: Scalars['String'],
rememberMe?: Maybe<Scalars['Boolean']>
};


export type MutationCreateChannelArgs = {
input: CreateChannelInput
};
Expand All @@ -1562,6 +1555,13 @@ export type MutationUpdateChannelArgs = {
};


export type MutationLoginArgs = {
username: Scalars['String'],
password: Scalars['String'],
rememberMe?: Maybe<Scalars['Boolean']>
};


export type MutationCreateCollectionArgs = {
input: CreateCollectionInput
};
Expand Down Expand Up @@ -1768,23 +1768,23 @@ export type MutationUpdateRoleArgs = {
};


export type MutationCreateShippingMethodArgs = {
input: CreateShippingMethodInput
export type MutationCreateTaxCategoryArgs = {
input: CreateTaxCategoryInput
};


export type MutationUpdateShippingMethodArgs = {
input: UpdateShippingMethodInput
export type MutationUpdateTaxCategoryArgs = {
input: UpdateTaxCategoryInput
};


export type MutationCreateTaxCategoryArgs = {
input: CreateTaxCategoryInput
export type MutationCreateShippingMethodArgs = {
input: CreateShippingMethodInput
};


export type MutationUpdateTaxCategoryArgs = {
input: UpdateTaxCategoryInput
export type MutationUpdateShippingMethodArgs = {
input: UpdateShippingMethodInput
};


Expand Down Expand Up @@ -1874,6 +1874,7 @@ export type Order = Node & {
subTotal: Scalars['Int'],
currencyCode: CurrencyCode,
shipping: Scalars['Int'],
shippingWithTax: Scalars['Int'],
shippingMethod?: Maybe<ShippingMethod>,
totalBeforeTax: Scalars['Int'],
total: Scalars['Int'],
Expand Down Expand Up @@ -1902,6 +1903,7 @@ export type OrderFilterParameter = {
subTotal?: Maybe<NumberOperators>,
currencyCode?: Maybe<StringOperators>,
shipping?: Maybe<NumberOperators>,
shippingWithTax?: Maybe<NumberOperators>,
totalBeforeTax?: Maybe<NumberOperators>,
total?: Maybe<NumberOperators>,
};
Expand Down Expand Up @@ -1953,6 +1955,7 @@ export type OrderSortParameter = {
subTotalBeforeTax?: Maybe<SortOrder>,
subTotal?: Maybe<SortOrder>,
shipping?: Maybe<SortOrder>,
shippingWithTax?: Maybe<SortOrder>,
totalBeforeTax?: Maybe<SortOrder>,
total?: Maybe<SortOrder>,
};
Expand Down Expand Up @@ -2294,10 +2297,10 @@ export type Query = {
administrator?: Maybe<Administrator>,
assets: AssetList,
asset?: Maybe<Asset>,
me?: Maybe<CurrentUser>,
channels: Array<Channel>,
channel?: Maybe<Channel>,
activeChannel: Channel,
me?: Maybe<CurrentUser>,
collections: CollectionList,
collection?: Maybe<Collection>,
collectionFilters: Array<ConfigurableOperation>,
Expand All @@ -2316,20 +2319,20 @@ export type Query = {
paymentMethod?: Maybe<PaymentMethod>,
productOptionGroups: Array<ProductOptionGroup>,
productOptionGroup?: Maybe<ProductOptionGroup>,
search: SearchResponse,
products: ProductList,
product?: Maybe<Product>,
search: SearchResponse,
promotion?: Maybe<Promotion>,
promotions: PromotionList,
adjustmentOperations: AdjustmentOperations,
roles: RoleList,
role?: Maybe<Role>,
taxCategories: Array<TaxCategory>,
taxCategory?: Maybe<TaxCategory>,
shippingMethods: ShippingMethodList,
shippingMethod?: Maybe<ShippingMethod>,
shippingEligibilityCheckers: Array<ConfigurableOperation>,
shippingCalculators: Array<ConfigurableOperation>,
taxCategories: Array<TaxCategory>,
taxCategory?: Maybe<TaxCategory>,
taxRates: TaxRateList,
taxRate?: Maybe<TaxRate>,
zones: Array<Zone>,
Expand Down Expand Up @@ -2447,11 +2450,6 @@ export type QueryProductOptionGroupArgs = {
};


export type QuerySearchArgs = {
input: SearchInput
};


export type QueryProductsArgs = {
languageCode?: Maybe<LanguageCode>,
options?: Maybe<ProductListOptions>
Expand All @@ -2464,6 +2462,11 @@ export type QueryProductArgs = {
};


export type QuerySearchArgs = {
input: SearchInput
};


export type QueryPromotionArgs = {
id: Scalars['ID']
};
Expand All @@ -2484,17 +2487,17 @@ export type QueryRoleArgs = {
};


export type QueryShippingMethodsArgs = {
options?: Maybe<ShippingMethodListOptions>
export type QueryTaxCategoryArgs = {
id: Scalars['ID']
};


export type QueryShippingMethodArgs = {
id: Scalars['ID']
export type QueryShippingMethodsArgs = {
options?: Maybe<ShippingMethodListOptions>
};


export type QueryTaxCategoryArgs = {
export type QueryShippingMethodArgs = {
id: Scalars['ID']
};

Expand Down Expand Up @@ -2658,6 +2661,7 @@ export type ShippingMethodListOptions = {
export type ShippingMethodQuote = {
id: Scalars['ID'],
price: Scalars['Int'],
priceWithTax: Scalars['Int'],
description: Scalars['String'],
};

Expand Down
4 changes: 4 additions & 0 deletions packages/common/src/generated-shop-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,7 @@ export type Order = Node & {
subTotal: Scalars['Int'];
currencyCode: CurrencyCode;
shipping: Scalars['Int'];
shippingWithTax: Scalars['Int'];
shippingMethod?: Maybe<ShippingMethod>;
totalBeforeTax: Scalars['Int'];
total: Scalars['Int'];
Expand Down Expand Up @@ -1305,6 +1306,7 @@ export type OrderFilterParameter = {
subTotal?: Maybe<NumberOperators>;
currencyCode?: Maybe<StringOperators>;
shipping?: Maybe<NumberOperators>;
shippingWithTax?: Maybe<NumberOperators>;
totalBeforeTax?: Maybe<NumberOperators>;
total?: Maybe<NumberOperators>;
};
Expand Down Expand Up @@ -1356,6 +1358,7 @@ export type OrderSortParameter = {
subTotalBeforeTax?: Maybe<SortOrder>;
subTotal?: Maybe<SortOrder>;
shipping?: Maybe<SortOrder>;
shippingWithTax?: Maybe<SortOrder>;
totalBeforeTax?: Maybe<SortOrder>;
total?: Maybe<SortOrder>;
};
Expand Down Expand Up @@ -1773,6 +1776,7 @@ export type ShippingMethodList = PaginatedList & {
export type ShippingMethodQuote = {
id: Scalars['ID'];
price: Scalars['Int'];
priceWithTax: Scalars['Int'];
description: Scalars['String'];
};

Expand Down
Loading

0 comments on commit 1b13aa3

Please sign in to comment.