Skip to content

Commit

Permalink
Updated API from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Sep 18, 2023
1 parent 45a4b2f commit 0d3a6e6
Show file tree
Hide file tree
Showing 195 changed files with 383 additions and 1,940 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "SQS",
"queueUrl": "https://sqs.<my-region>.amazonaws.com/<my-aws-account-number>/<my-queue>",
"queueUrl": "https://<my-region>.amazonaws.com/<my-aws-account-number>/<my-queue>",
"accessKey": "<my-access-key>",
"accessSecret": "<my-access-secret>",
"region": "<my-region>",
Expand Down
8 changes: 0 additions & 8 deletions api-specs/api/examples/standalone-price.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
"centAmount": 10000,
"fractionDigits": 2
},
"staged": {
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 20000,
"fractionDigits": 2
}
},
"active": true,
"createdAt": "2022-05-09T08:29:13.253Z",
"lastModifiedAt": "2022-05-09T12:36:55.401Z"
Expand Down
38 changes: 38 additions & 0 deletions api-specs/api/resources/me.raml
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,44 @@ delete:
body:
application/json:
example: !include ../examples/my-payment.example.json
/key={key}:
(methodName): withKey
type:
baseResource:
uriParameterName: key
resourceType: MyPayment
resourceUpdateType: MyPaymentUpdate
get:
displayName: Get my payment by key
securedBy: [oauth_2_0: { scopes: ['manage_my_payments:{projectKey}'] }]
responses:
200:
body:
application/json:
example: !include ../examples/my-payment.example.json
post:
displayName: Update my payment by key
securedBy: [oauth_2_0: { scopes: ['manage_my_payments:{projectKey}'] }]
body:
application/json:
example: !include ../examples/my-payment-update.example.json
description: |
This endpoint can only update a Payment when it has no [Transactions](ctp:api:type:Transaction).
responses:
200:
body:
application/json:
example: !include ../examples/my-payment.example.json
delete:
displayName: Delete my payment by key
securedBy: [oauth_2_0: { scopes: ['manage_my_payments:{projectKey}'] }]
description: |
This endpoint can only delete a Payment when it has no [Transactions](ctp:api:type:Transaction).
responses:
200:
body:
application/json:
example: !include ../examples/my-payment.example.json
/{ID}:
(methodName): withId
type:
Expand Down
1 change: 0 additions & 1 deletion api-specs/api/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
<option type="exclude">shipping</option>
<option type="exclude">customShipping</option>
<option type="exclude">perMethodTaxRate</option>
<option type="exclude">perMethodExternalTaxRate</option>
<option type="exclude">sort</option>
<option type="exclude">and</option>
<option type="exclude">filter</option>
Expand Down
1 change: 0 additions & 1 deletion api-specs/api/types/business-unit/BusinessUnitStatus.raml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ enum:
The Business Unit can be used in Carts, Orders, Quote Requests, and Quotes and can be edited.
Inactive: |
The Business Unit cannot be used in Carts, Orders, Quote Requests, and Quotes and can only be edited using the [general endpoint](ctp:api:endpoint:/{projectKey}/me/business-units:POST).
Status doesn't affect inheritance. Even if a parent unit is inactive, its children remain active and can inherit role assignments.
default: Active
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ type: BusinessUnitUpdateAction
displayName: BusinessUnitSetAddressCustomFieldAction
discriminatorValue: setAddressCustomField
example: !include ../../../examples/BusinessUnit/BusinessUnitSetAddressCustomFieldAction.json
description: |
Adding a Custom Field to an Address of a Business Unit generates the [BusinessUnitAddressCustomFieldAdded](ctp:api:type:BusinessUnitAddressCustomFieldAddedMessage) Message, removing one generates the [BusinessUnitAddressCustomFieldRemoved](ctp:api:type:BusinessUnitAddressCustomFieldRemovedMessage) Message, and updating an existing one generates the [BusinessUnitAddressCustomFieldChanged](ctp:api:type:BusinessUnitAddressCustomFieldChangedMessage) Message.
properties:
addressId:
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#%RAML 1.0 DataType
(package): BusinessUnit
(docs-uri): https://docs.commercetools.com/api/projects/business-units#set-custom-type-in-address
(docs-uri): https://docs.commercetools.com/api/projects/business-units#set-customtype-in-address
type: BusinessUnitUpdateAction
displayName: BusinessUnitSetAddressCustomTypeAction
discriminatorValue: setAddressCustomType
example: !include ../../../examples/BusinessUnit/BusinessUnitSetAddressCustomTypeAction.json
description: |
Adding or updating a Custom Type on an Address of a Business Unit generates the [BusinessUnitAddressCustomTypeSet](ctp:api:type:BusinessUnitAddressCustomTypeSetMessage) Message, and removing one generates the [BusinessUnitAddressCustomTypeRemoved](ctp:api:type:BusinessUnitAddressCustomTypeRemovedMessage) Message.
properties:
type?:
type: TypeResourceIdentifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ type: BusinessUnitUpdateAction
displayName: BusinessUnitSetCustomFieldAction
discriminatorValue: setCustomField
example: !include ../../../examples/BusinessUnit/BusinessUnitSetCustomFieldAction.json
description: |
Adding a Custom Field to a Business Unit generates the [BusinessUnitCustomFieldAdded](ctp:api:type:BusinessUnitCustomFieldAddedMessage) Message, removing one generates the [BusinessUnitCustomFieldRemoved](ctp:api:type:BusinessUnitCustomFieldRemovedMessage) Message, and updating an existing one generates the [BusinessUnitCustomFieldChanged](ctp:api:type:BusinessUnitCustomFieldChangedMessage) Message.
properties:
name:
type: string
description: |
Name of the [Custom Field](/../api/projects/custom-fields) to add, update, or remove.
Name of the [Custom Field](/../api/projects/custom-fields).
value?:
type: CustomFieldValue
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ type: BusinessUnitUpdateAction
displayName: BusinessUnitSetCustomTypeAction
discriminatorValue: setCustomType
example: !include ../../../examples/BusinessUnit/BusinessUnitSetCustomTypeAction.json
description: |
Adding or updating a Custom Type on a Business Unit generates the [BusinessUnitCustomTypeSet](ctp:api:type:BusinessUnitCustomTypeSetMessage) Message, removing one generates the [BusinessUnitCustomTypeRemoved](ctp:api:type:BusinessUnitCustomTypeRemovedMessage) Message.
properties:
type?:
type: TypeResourceIdentifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ properties:
type: Money[]
description: |
Money values in different currencies.
An absolute Cart Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the array has multiple values of the same currency, the API returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
If the array is empty, the discount does not apply.
An absolute Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ properties:
type: TypedMoneyDraft[]
description: |
Money values provided either in [cent precision](ctp:api:type:Money) or [high precision](ctp:api:type:HighPrecisionMoneyDraft) for different currencies.
A fixed Cart Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$. If the array has multiple values of the same currency, the API returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
If the array is empty, the discount does not apply.
A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.
1 change: 1 addition & 0 deletions api-specs/api/types/cart/Cart.raml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ properties:
[Anonymous session](ctp:api:type:AnonymousSession) associated with the Cart.
businessUnit?:
type: BusinessUnitKeyReference
(beta): true
description: |
[Reference](ctp:api:type:Reference) to a Business Unit the Cart belongs to.
store?:
Expand Down
1 change: 1 addition & 0 deletions api-specs/api/types/cart/CartDraft.raml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ properties:
[Anonymous session](ctp:api:type:AnonymousSession) associated with the Cart.
businessUnit?:
type: BusinessUnitResourceIdentifier
(beta): true
description: |
[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to the Business Unit the Cart should belong to. When the `customerId` of the Cart is also set, the [Customer](ctp:api:type:Customer) must be an [Associate](ctp:api:type:Associate) of the Business Unit.
store?:
Expand Down
2 changes: 2 additions & 0 deletions api-specs/api/types/cart/ExternalLineItemTotalPrice.raml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ properties:
type: Money
description: |
Price of the Line Item.
The value is selected from the Product Variant according to the [Product](ctp:api:type:Product) `priceMode`.
totalPrice:
type: Money
description: |
Expand Down
6 changes: 1 addition & 5 deletions api-specs/api/types/cart/LineItemDraft.raml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@ properties:
externalTaxRate?:
type: ExternalTaxRateDraft
description: |
Sets the external Tax Rate for the Line Item, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
perMethodExternalTaxRate?:
type: MethodExternalTaxRateDraft[]
description: |
Sets the external Tax Rates for individual Shipping Methods, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode) and `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
External Tax Rate for the Line Item if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
inventoryMode?:
type: InventoryMode
description: |
Expand Down
14 changes: 0 additions & 14 deletions api-specs/api/types/cart/MethodExternalTaxRateDraft.raml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#%RAML 1.0 DataType
(package): Channel
(docs-uri): https://docs.commercetools.com/api/projects/channels#set-custom-type-in-address
(docs-uri): https://docs.commercetools.com/api/projects/channels#set-customtype-in-address
type: ChannelUpdateAction
displayName: ChannelSetAddressCustomTypeAction
discriminatorValue: setAddressCustomType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ type: CustomerUpdateAction
displayName: CustomerSetAddressCustomFieldAction
discriminatorValue: setAddressCustomField
example: !include ../../../examples/Customer/CustomerSetAddressCustomFieldAction.json
description: |
Adding a Custom Field to an Address of a Customer generates the [CustomerAddressCustomFieldAdded](ctp:api:type:CustomerAddressCustomFieldAddedMessage) Message, removing one generates the [CustomerAddressCustomFieldRemoved](ctp:api:type:CustomerAddressCustomFieldRemovedMessage) Message, and updating an existing one generates the [CustomerAddressCustomFieldChanged](ctp:api:type:CustomerAddressCustomFieldChangedMessage) Message.
properties:
addressId:
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#%RAML 1.0 DataType
(package): Customer
(docs-uri): https://docs.commercetools.com/api/projects/customers#set-custom-type-in-address
(docs-uri): https://docs.commercetools.com/api/projects/customers#set-customtype-in-address
type: CustomerUpdateAction
displayName: CustomerSetAddressCustomTypeAction
discriminatorValue: setAddressCustomType
example: !include ../../../examples/Customer/CustomerSetAddressCustomTypeAction.json
description: |
Adding or updating a Custom Type on an Address of a Customer generates the [CustomerAddressCustomTypeSet](ctp:api:type:CustomerAddressCustomTypeSetMessage) Message, and removing one generates the [CustomerAddressCustomTypeRemoved](ctp:api:type:CustomerAddressCustomTypeRemovedMessage) Message.
properties:
addressId:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ type: CustomerUpdateAction
displayName: CustomerSetCustomFieldAction
discriminatorValue: setCustomField
example: !include ../../../examples/Customer/CustomerSetCustomFieldAction.json
description: |
Adding a Custom Field to a Customer generates the [CustomerCustomFieldAdded](ctp:api:type:CustomerCustomFieldAddedMessage) Message, removing one generates the [CustomerCustomFieldRemoved](ctp:api:type:CustomerCustomFieldRemovedMessage) Message, and updating an existing one generates the [CustomerCustomFieldChanged](ctp:api:type:CustomerCustomFieldChangedMessage) Message.
properties:
name:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ type: CustomerUpdateAction
displayName: CustomerSetCustomTypeAction
discriminatorValue: setCustomType
example: !include ../../../examples/Customer/CustomerSetCustomTypeAction.json
description: |
Adding or updating a Custom Type on a Customer generates the [CustomerCustomTypeSet](ctp:api:type:CustomerCustomTypeSetMessage) Message, removing one generates the [CustomerCustomTypeRemoved](ctp:api:type:CustomerCustomTypeRemovedMessage) Message.
properties:
type?:
type: TypeResourceIdentifier
Expand Down
1 change: 1 addition & 0 deletions api-specs/api/types/me/MyCartDraft.raml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ properties:
Email address of the Customer the Cart belongs to.
businessUnit?:
type: BusinessUnitResourceIdentifier
(beta): true
description: |
[ResourceIdentifier](ctp:api:type:ResourceIdentifier) to the Business Unit the Cart should belong to. The [Customer](ctp:api:type:Customer) must be an [Associate](ctp:api:type:Associate) of the Business Unit.
store?:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ type: MyBusinessUnitUpdateAction
displayName: MyBusinessUnitSetAddressCustomFieldAction
example: !include ../../../examples/BusinessUnit/BusinessUnitSetAddressCustomFieldAction.json
discriminatorValue: setAddressCustomField
description: |
Adding a Custom Field to an Address of a Business Unit generates the [BusinessUnitAddressCustomFieldAdded](ctp:api:type:BusinessUnitAddressCustomFieldAddedMessage) Message, removing one generates the [BusinessUnitAddressCustomFieldRemoved](ctp:api:type:BusinessUnitAddressCustomFieldRemovedMessage) Message, and updating an existing one generates the [BusinessUnitAddressCustomFieldChanged](ctp:api:type:BusinessUnitAddressCustomFieldChangedMessage) Message.
properties:
addressId:
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#%RAML 1.0 DataType
(package): Me
(docs-uri): https://docs.commercetools.com/api/projects/me-business-units#set-custom-type-in-address
(docs-uri): https://docs.commercetools.com/api/projects/me-business-units#set-customtype-in-address
type: MyBusinessUnitUpdateAction
displayName: MyBusinessUnitSetAddressCustomTypeAction
example: !include ../../../examples/BusinessUnit/BusinessUnitSetAddressCustomTypeAction.json
discriminatorValue: setAddressCustomType
description: |
Adding or updating a Custom Type to an Address of a Business Unit generates the [BusinessUnitAddressCustomTypeSet](ctp:api:type:BusinessUnitAddressCustomTypeSetMessage) Message, and removing one generates the [BusinessUnitAddressCustomTypeRemoved](ctp:api:type:BusinessUnitAddressCustomTypeRemovedMessage) Message.
properties:
type?:
type: TypeResourceIdentifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ type: MyBusinessUnitUpdateAction
displayName: MyBusinessUnitSetCustomFieldAction
example: !include ../../../examples/BusinessUnit/BusinessUnitSetCustomFieldAction.json
discriminatorValue: setCustomField
description: |
Adding a Custom Field to a Business Unit generates the [BusinessUnitCustomFieldAdded](ctp:api:type:BusinessUnitCustomFieldAddedMessage) Message, removing one generates the [BusinessUnitCustomFieldRemoved](ctp:api:type:BusinessUnitCustomFieldRemovedMessage) Message, and updating an existing one generates the [BusinessUnitCustomFieldChanged](ctp:api:type:BusinessUnitCustomFieldChangedMessage) Message.
properties:
name:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ type: MyBusinessUnitUpdateAction
displayName: MyBusinessUnitSetCustomTypeAction
example: !include ../../../examples/BusinessUnit/BusinessUnitSetCustomTypeAction.json
discriminatorValue: setCustomType
description: |
Adding or updating a Custom Type on a Business Unit generates the [BusinessUnitCustomTypeSet](ctp:api:type:BusinessUnitCustomTypeSetMessage) Message, removing one generates the [BusinessUnitCustomTypeRemoved](ctp:api:type:BusinessUnitCustomTypeRemovedMessage) Message.
properties:
type?:
type: TypeResourceIdentifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ type: MyCustomerUpdateAction
displayName: MyCustomerSetCustomFieldAction
example: !include ../../../examples/Customer/CustomerSetCustomFieldAction.json
discriminatorValue: setCustomField
description: |
Adding a Custom Field to a Customer generates the [CustomerCustomFieldAdded](ctp:api:type:CustomerCustomFieldAddedMessage) Message, removing one generates the [CustomerCustomFieldRemoved](ctp:api:type:CustomerCustomFieldRemovedMessage) Message, and updating an existing one generates the [CustomerCustomFieldChanged](ctp:api:type:CustomerCustomFieldChangedMessage) Message.
properties:
name:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ type: MyCustomerUpdateAction
displayName: MyCustomerSetCustomTypeAction
example: !include ../../../examples/Customer/CustomerSetCustomTypeAction.json
discriminatorValue: setCustomType
description: |
Adding or updating a Custom Type on a Customer generates the [CustomerCustomTypeSet](ctp:api:type:CustomerCustomTypeSetMessage) Message, removing one generates the [CustomerCustomTypeRemoved](ctp:api:type:CustomerCustomTypeRemovedMessage) Message.
properties:
type?:
type: TypeResourceIdentifier
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 0d3a6e6

Please sign in to comment.