To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorConsume a valorization relationships
As a client application customer
I want to see a valorization relationships
So that I can discover each related resource
- Background
-
- Given
-
the following valorizations exist
ID version packs equipments standard-value custom-value displayed-value btob-transaction-value btoc-transaction-value 1 76 [34,442] [324,234] 1 2 2 98763 [398,3487] 3 3 3789 39487 4 5 6 7 8 4 34987 237 342 9 10 11 12 5 45 [34,33] 13 14 15 16 - And
- I use a valid token which authorizes access to the "Checkout::V2::ValorizationResource" scope
- And
- I authenticate as the following proxy user "johndoe"
- Scenarios
-
- Consume a single resource relationships
- Consume a standard value associated to a valorization
- Consume a custom value associated to a valorization
- Consume a missing custom value associated to a valorization
- Consume a displayed value associated to a valorization
- Consume a missing displayed value associated to a valorization
- Consume a B2B transaction value associated to a valorization
- Consume a missing B2B transaction value associated to a valorization
- Consume a B2C transaction value associated to a valorization
- Consume a missing B2C transaction value associated to a valorization
- Consume a version associated to a valorization
- Consume packs associated to a valorization
- Consume packs associated to a valorization without packs
- Consume equipments associated to a valorization
- Consume equipments associated to a valorization without equipments
- Consume a single resource relationships
-
- When
- I send a GET request for "checkout/2.0/valorizations/ID"
- Then
- the response status should be "200"
- And
- the resource should have a relationship "version"
- And
- the resource should have a relationship "packs"
- And
- the resource should have a relationship "equipments"
- And
- the resource should have a relationship "standard-value"
- And
- the resource should have a relationship "custom-value"
- And
- the resource should have a relationship "displayed-value"
- And
- the resource should have a relationship "btob-transaction-value"
- And
- the resource should have a relationship "btoc-transaction-value"
Examples: ID version packs equipments standard-value custom-value displayed-value btob-transaction-value btoc-transaction-value 1 76 [34,442] [324,234] 1 2 2 98763 [398,3487] 3 3 3789 39487 4 5 6 7 8 4 34987 237 342 9 10 11 12 5 45 [34,33] 13 14 15 16 - Consume a standard value associated to a valorization
-
- When
- I send a GET request for "checkout/2.0/valorizations/ID/standard-value"
- Then
- the response status should be "200"
- And
- the response should be a JSON API resource of type "values"
- And
- the resource should have the ID "standard-value"
Examples: ID version packs equipments standard-value custom-value displayed-value btob-transaction-value btoc-transaction-value 1 76 [34,442] [324,234] 1 2 2 98763 [398,3487] 3 3 3789 39487 4 5 6 7 8 4 34987 237 342 9 10 11 12 5 45 [34,33] 13 14 15 16 - Consume a custom value associated to a valorization
-
- When
- I send a GET request for "checkout/2.0/valorizations/ID/custom-value"
- Then
- the response status should be "200"
- And
- the response should be a JSON API resource of type "values"
- And
- the resource should have the ID "custom-value"
Examples: ID version packs equipments standard-value custom-value displayed-value btob-transaction-value btoc-transaction-value 1 76 [34,442] [324,234] 1 2 3 3789 39487 4 5 6 7 8 4 34987 237 342 9 10 11 12 5 45 [34,33] 13 14 15 16 - Consume a missing custom value associated to a valorization
-
- When
- I send a GET request for "checkout/2.0/valorizations/2/custom-value"
- Then
- the response status should be "200"
- And
- the JSON at "data" should be null
- Consume a displayed value associated to a valorization
-
- When
- I send a GET request for "checkout/2.0/valorizations/ID/displayed-value"
- Then
- the response status should be "200"
- And
- the response should be a JSON API resource of type "values"
- And
- the resource should have the ID "displayed-value"
Examples: ID version packs equipments standard-value custom-value displayed-value btob-transaction-value btoc-transaction-value 3 3789 39487 4 5 6 7 8 4 34987 237 342 9 10 11 12 5 45 [34,33] 13 14 15 16 - Consume a missing displayed value associated to a valorization
-
- When
- I send a GET request for "checkout/2.0/valorizations/ID/displayed-value"
- Then
- the response status should be "200"
- And
- the JSON at "data" should be null
Examples: ID version packs equipments standard-value custom-value displayed-value btob-transaction-value btoc-transaction-value 1 76 [34,442] [324,234] 1 2 2 98763 [398,3487] 3 - Consume a B2B transaction value associated to a valorization
-
- When
- I send a GET request for "checkout/2.0/valorizations/ID/btob-transaction-value"
- Then
- the response status should be "200"
- And
- the response should be a JSON API resource of type "values"
- And
- the resource should have the ID "btob-transaction-value"
Examples: ID version packs equipments standard-value custom-value displayed-value btob-transaction-value btoc-transaction-value 3 3789 39487 4 5 6 7 8 4 34987 237 342 9 10 11 12 5 45 [34,33] 13 14 15 16 - Consume a missing B2B transaction value associated to a valorization
-
- When
- I send a GET request for "checkout/2.0/valorizations/ID/btob-transaction-value"
- Then
- the response status should be "200"
- And
- the JSON at "data" should be null
Examples: ID version packs equipments standard-value custom-value displayed-value btob-transaction-value btoc-transaction-value 1 76 [34,442] [324,234] 1 2 2 98763 [398,3487] 3 - Consume a B2C transaction value associated to a valorization
-
- When
- I send a GET request for "checkout/2.0/valorizations/3/btoc-transaction-value"
- Then
- the response status should be "200"
- And
- the response should be a JSON API resource of type "values"
- And
- the resource should have the ID "8"
- Consume a missing B2C transaction value associated to a valorization
-
- When
- I send a GET request for "checkout/2.0/valorizations/ID/btoc-transaction-value"
- Then
- the response status should be "200"
- And
- the JSON at "data" should be null
Examples: ID version packs equipments standard-value custom-value displayed-value btob-transaction-value btoc-transaction-value 1 76 [34,442] [324,234] 1 2 2 98763 [398,3487] 3 4 34987 237 342 9 10 11 12 5 45 [34,33] 13 14 15 16 - Consume a version associated to a valorization
-
- Given
-
a GET request to "vehicles/2.0/versions/version" returns
{"data": { "id": "version", "type": "versions" }}
- When
- I send a GET request for "checkout/2.0/valorizations/ID/version"
- Then
- the response status should be "200"
- And
- the response should be a JSON API resource of type "versions"
- And
- the resource should have the ID "version"
Examples: ID version packs equipments standard-value custom-value displayed-value btob-transaction-value btoc-transaction-value 1 76 [34,442] [324,234] 1 2 2 98763 [398,3487] 3 3 3789 39487 4 5 6 7 8 4 34987 237 342 9 10 11 12 5 45 [34,33] 13 14 15 16 - Consume packs associated to a valorization
-
- Given
-
a GET request to "vehicles/2.0/packs?filter[id]=34,442" returns
{ "data": [ { "id": "34", "type": "packs" }, { "id": "442", "type": "packs" } ] }
- When
- I send a GET request for "checkout/2.0/valorizations/1/packs"
- Then
- the response status should be "200"
- And
-
the JSON response at "data" should be:
[ { "id": "34", "type": "packs" }, { "id": "442", "type": "packs" } ]
- Consume packs associated to a valorization without packs
-
- When
- I send a GET request for "checkout/2.0/valorizations/2/packs"
- Then
- the response status should be "200"
- And
- the JSON response at "data" should be []
- Consume equipments associated to a valorization
-
- Given
-
a GET request to "vehicles/2.0/equipments?filter[id]=324,234" returns
{ "data": [ { "id": "324", "type": "equipments" }, { "id": "234", "type": "equipments" } ] }
- When
- I send a GET request for "checkout/2.0/valorizations/1/equipments"
- Then
- the response status should be "200"
- And
-
the JSON response at "data" should be:
[ {"id": "324", "type": "equipments" }, {"id": "234", "type": "equipments" } ]
- Consume equipments associated to a valorization without equipments
-
- When
- I send a GET request for "checkout/2.0/valorizations/3/equipments"
- Then
- the response status should be "200"
- And
- the JSON response at "data" should be []
Last published about 5 years ago by Donaldo.