Logo: Relish

  1. Sign in

Project: Checkout v2.0

  • Change version

    1. v2.0

Consume a client resource

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

Background
Given
I use a valid token which authorize access to the "Checkout::V2::ClientResource" scope
And
the following clients exist
ID product platform version account device-id install-id country
1 PlanetVO2 server 1.0 user1 FR
2 PlanetVO2 server 1.0 user2 BE
3 LaCoteArgus iOS 1.0 1234 5678 FR
4 LaCoteArgus Android 1.0 5678 1234 BE
Scenarios
Get a client coming from a server application
Given
I authenticate as the following proxy user "account"
When
I send a GET request for "checkout/2.0/clients/ID"
Then
the response status should be "200"
And
the response should be a JSON API resource of type "clients"
And
the resource should have an attribute "product" that displays "product"
And
the resource should have an attribute "platform" that displays "platform"
And
the resource should have an attribute "version" that displays "version"
And
the resource should have an attribute "account" that displays "account"
And
the resource should have an attribute "country" that displays "country"
Examples:
ID product platform version account device-id install-id country
1 PlanetVO2 server 1.0 user1 FR
2 PlanetVO2 server 1.0 user2 BE
Get a client resource coming from a mobile client application
Given
I use a valid token which authorizes access to the "Checkout::V2::ClientResource" scope
And
I authenticate as the following proxy user "johndoe"
When
I send a GET request for "checkout/2.0/clients/ID"
Then
the response status should be "200"
And
the response should be a JSON API resource of type "clients"
And
the resource should have an attribute "product" that displays "product"
And
the resource should have an attribute "platform" that displays "platform"
And
the resource should have an attribute "version" that displays "version"
And
the resource should have an attribute "device-id" that displays "device-id"
And
the resource should have an attribute "install-id" that displays "install-id"
And
the resource should have an attribute "country" that displays "country"
Examples:
ID product platform version account device-id install-id country
3 LaCoteArgus iOS 1.0 1234 5678 FR
4 LaCoteArgus Android 1.0 5678 1234 BE
Resource not found
Given
I use a valid token which authorizes access to the "Checkout::V2::ClientResource" scope
And
I authenticate as the following proxy user "johndoe"
When
I send a GET request for "checkout/2.0/clients/5"
Then
the response status should be "404"
And
the response should be a JSON API error

Last published almost 4 years ago by Donaldo.