Logo: Relish

  1. Sign in

Project: Checkout v2.0

  • Change version

    1. v2.0

Consume a value resource

As a client application customer
I want to consume a value resource
So that I can see the detailed content of the requested value

Background
Given
I use a valid token which authorizes access to the "Checkout::V2::ValueResource" scope
And
the following values exist
ID subtype bz-case mileage options body confidence leeway-val leeway-perc value label
1 standard regular 100.5 Cours Argus Moyen
2 custom regular -100 500 487 9999.99 Cote Argus Personnalisée®
3 custom substitute 9999.99 Valeur indicative
4 displayed regular 5 23894 Valeur Argus Annonces®
5 displayed extended 5 500 35 23894 Valeur Argus Annonces®
6 btob-transaction regular 5 100.5 Valeur Argus Transactions® BtoB
7 btoc-transaction regular 5 100.5 Valeur Argus Transactions® BtoC
And
I authenticate as the following proxy user "johndoe"
Scenarios
Get a very simple value
When
I send a GET request for "checkout/2.0/values/ID"
Then
the response status should be "200"
And
the response should be a JSON API resource of type "values"
And
the resource should have an attribute "subtype" that displays "subtype"
And
the resource should have an attribute "value" that displays value
And
the resource should have an attribute "label" that displays "label"
And
the resource should have a meta "business-case" that displays "bz-case"
Examples:
ID subtype bz-case value label
1 standard regular 100.5 Cours Argus Moyen
3 custom substitute 9999.99 Valeur indicative
Get a value which have mileage, options and body influence
When
I send a GET request for "checkout/2.0/values/2"
Then
the response status should be "200"
And
the response should be a JSON API resource of type "values"
And
the resource should have an attribute "subtype" that displays "custom"
And
the resource should have an attribute "value" that displays 9999.99
And
the resource should have an attribute "label" that displays "Cote Argus Personnalisée®"
And
the resource should have a meta "business-case" that displays "regular"
And
the resource should have a meta "mileage-influence" that displays -100.0
And
the resource should have a meta "options-influence" that displays 500.0
And
the resource should have a meta "body-influence" that displays 487.0
Get a value which have confidence index
When
I send a GET request for "checkout/2.0/values/ID"
Then
the response status should be "200"
And
the response should be a JSON API resource of type "values"
And
the resource should have an attribute "subtype" that displays "subtype"
And
the resource should have an attribute "value" that displays value
And
the resource should have an attribute "label" that displays "label"
And
the resource should have a meta "business-case" that displays "bz-case"
And
the resource should have a meta "confidence-index" that displays confidence
Examples:
ID subtype bz-case confidence value label
4 displayed regular 5 23894.0 Valeur Argus Annonces®
6 btob-transaction regular 5 100.5 Valeur Argus Transactions® BtoB
7 btoc-transaction regular 5 100.5 Valeur Argus Transactions® BtoC
Get a value which have confidence index and leeway value/percentage
When
I send a GET request for "checkout/2.0/values/5"
Then
the response status should be "200"
And
the response should be a JSON API resource of type "values"
And
the resource should have an attribute "subtype" that displays "displayed"
And
the resource should have an attribute "value" that displays 23894.0
And
the resource should have an attribute "label" that displays "Valeur Argus Annonces®"
And
the resource should have a meta "business-case" that displays "extended"
And
the resource should have a meta "confidence-index" that displays 5
And
the resource should have a meta "leeway-value" that displays 500.0
And
the resource should have a meta "leeway-percentage" that displays 35

Last published over 4 years ago by Donaldo.