Skip to content

Commit

Permalink
TASK: Updating RAML types, Postman and OAS definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Aug 22, 2024
1 parent 9fb04da commit 754260f
Show file tree
Hide file tree
Showing 16 changed files with 172 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ body:json {
"money" : [ {
"currencyCode" : "EUR",
"centAmount" : 40099
} ]
} ],
"applicationMode" : "IndividualApplication"
}
}
]
Expand Down
18 changes: 18 additions & 0 deletions oas/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38399,6 +38399,8 @@ components:
type: "array"
items:
$ref: '#/components/schemas/CentPrecisionMoney'
applicationMode:
$ref: '#/components/schemas/DiscountApplicationMode'
CartDiscountValueAbsoluteDraft:
allOf:
- $ref: '#/components/schemas/CartDiscountValueDraft'
Expand All @@ -38412,6 +38414,8 @@ components:
type: "array"
items:
$ref: '#/components/schemas/Money'
applicationMode:
$ref: '#/components/schemas/DiscountApplicationMode'
CartDiscountValueDraft:
type: "object"
discriminator:
Expand Down Expand Up @@ -38514,6 +38518,20 @@ components:
permyriad:
type: "integer"
format: "int64"
DiscountApplicationMode:
type: "string"
enum:
- ProportionateDistribution
- EvenDistribution
- IndividualApplication
x-annotation-package: "CartDiscount"
x-annotation-enumDescriptions:
ProportionateDistribution: "Distributes the Discount proportionately across eligible
Line Items or Custom Line Items."
EvenDistribution: "Distributes the Discount evenly across eligible Line Items or Custom
Line Items."
IndividualApplication: "Applies the Discount individually to eligible Line Item or
Custom Line Item."
MultiBuyCustomLineItemsTarget:
allOf:
- $ref: '#/components/schemas/CartDiscountTarget'
Expand Down
1 change: 1 addition & 0 deletions uml/api/CartDiscountValue.puml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface CartDiscountValue [[CartDiscountValue.svg]] {
interface CartDiscountValueAbsolute [[CartDiscountValueAbsolute.svg]] {
type: String
money: [[CentPrecisionMoney.svg List<CentPrecisionMoney>]]
applicationMode: [[DiscountApplicationMode.svg DiscountApplicationMode]]
}
interface CartDiscountValueFixed [[CartDiscountValueFixed.svg]] {
type: String
Expand Down
1 change: 1 addition & 0 deletions uml/api/CartDiscountValueAbsolute.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ endlegend
interface CartDiscountValueAbsolute [[CartDiscountValueAbsolute.svg]] extends CartDiscountValue {
type: String
money: [[CentPrecisionMoney.svg List<CentPrecisionMoney>]]
applicationMode: [[DiscountApplicationMode.svg DiscountApplicationMode]]
}
interface CartDiscountValue [[CartDiscountValue.svg]] {
type: String
Expand Down
1 change: 1 addition & 0 deletions uml/api/CartDiscountValueAbsoluteDraft.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ endlegend
interface CartDiscountValueAbsoluteDraft [[CartDiscountValueAbsoluteDraft.svg]] extends CartDiscountValueDraft {
type: String
money: [[Money.svg List<Money>]]
applicationMode: [[DiscountApplicationMode.svg DiscountApplicationMode]]
}
interface CartDiscountValueDraft [[CartDiscountValueDraft.svg]] {
type: String
Expand Down
1 change: 1 addition & 0 deletions uml/api/CartDiscountValueDraft.puml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface CartDiscountValueDraft [[CartDiscountValueDraft.svg]] {
interface CartDiscountValueAbsoluteDraft [[CartDiscountValueAbsoluteDraft.svg]] {
type: String
money: [[Money.svg List<Money>]]
applicationMode: [[DiscountApplicationMode.svg DiscountApplicationMode]]
}
interface CartDiscountValueFixedDraft [[CartDiscountValueFixedDraft.svg]] {
type: String
Expand Down
1 change: 1 addition & 0 deletions uml/api/CentPrecisionMoney.puml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ interface TypedMoney [[TypedMoney.svg]] {
interface CartDiscountValueAbsolute [[CartDiscountValueAbsolute.svg]] {
type: String
money: [[CentPrecisionMoney.svg List<CentPrecisionMoney>]]
applicationMode: [[DiscountApplicationMode.svg DiscountApplicationMode]]
}
interface ProductDiscountValueAbsolute [[ProductDiscountValueAbsolute.svg]] {
type: String
Expand Down
21 changes: 21 additions & 0 deletions uml/api/DiscountApplicationMode.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@startuml

hide methods
enum DiscountApplicationMode {
PROPORTIONATE_DISTRIBUTION
EVEN_DISTRIBUTION
INDIVIDUAL_APPLICATION
}
interface CartDiscountValueAbsolute [[CartDiscountValueAbsolute.svg]] {
type: String
money: [[CentPrecisionMoney.svg List<CentPrecisionMoney>]]
applicationMode: [[DiscountApplicationMode.svg DiscountApplicationMode]]
}
interface CartDiscountValueAbsoluteDraft [[CartDiscountValueAbsoluteDraft.svg]] {
type: String
money: [[Money.svg List<Money>]]
applicationMode: [[DiscountApplicationMode.svg DiscountApplicationMode]]
}
DiscountApplicationMode --> CartDiscountValueAbsolute #green;text:green : "applicationMode"
DiscountApplicationMode --> CartDiscountValueAbsoluteDraft #green;text:green : "applicationMode"
@enduml
1 change: 1 addition & 0 deletions uml/api/Money.puml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ interface HighPrecisionMoneyDraft [[HighPrecisionMoneyDraft.svg]] {
interface CartDiscountValueAbsoluteDraft [[CartDiscountValueAbsoluteDraft.svg]] {
type: String
money: [[Money.svg List<Money>]]
applicationMode: [[DiscountApplicationMode.svg DiscountApplicationMode]]
}
interface ProductDiscountValueAbsoluteDraft [[ProductDiscountValueAbsoluteDraft.svg]] {
type: String
Expand Down
15 changes: 8 additions & 7 deletions uml/api/svg/CartDiscountValue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions uml/api/svg/CartDiscountValueAbsolute.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 754260f

Please sign in to comment.