88const omitBy = require ( 'lodash.omitby' )
99const isNil = require ( 'lodash.isnil' )
1010
11- const VALID_METHODS = [ 'GET' , 'POST' , 'PUT' , 'PATCH' , 'DELETE' , 'HEAD' , 'OPTIONS' ]
11+ const VALID_METHODS = [ 'GET' , 'POST' , 'PUT' , 'PATCH' , 'DELETE' , 'HEAD' , 'OPTIONS' ]
1212
1313module . exports = class Interaction {
1414
1515 /**
1616 * Creates a new Interaction.
1717 * @returns {Interaction } interaction
1818 */
19- constructor ( ) {
19+ constructor ( ) {
2020 this . state = { }
2121 return this
2222 }
@@ -26,9 +26,9 @@ module.exports = class Interaction {
2626 * @param {string } providerState - The state of the provider.
2727 * @returns {Interaction } interaction
2828 */
29- given ( providerState ) {
29+ given ( providerState ) {
3030 if ( providerState ) {
31- this . state [ 'provider_state ' ] = providerState
31+ this . state [ 'providerState ' ] = providerState
3232 }
3333 return this
3434 }
@@ -38,7 +38,7 @@ module.exports = class Interaction {
3838 * @param {string } description - A description of the interaction.
3939 * @returns {Interaction } interaction
4040 */
41- uponReceiving ( description ) {
41+ uponReceiving ( description ) {
4242 if ( isNil ( description ) ) {
4343 throw new Error ( 'You must provide a description for the interaction.' )
4444 }
@@ -56,7 +56,7 @@ module.exports = class Interaction {
5656 * @param {Object } requestOpts.body - The body, in {@link String} format or {@link Object} format
5757 * @returns {Interaction } interaction
5858 */
59- withRequest ( requestOpts ) {
59+ withRequest ( requestOpts ) {
6060 var method = requestOpts . method
6161 var path = requestOpts . path
6262 var query = requestOpts . query
@@ -92,7 +92,7 @@ module.exports = class Interaction {
9292 * @param {string } responseOpts.headers
9393 * @param {Object } responseOpts.body
9494 */
95- willRespondWith ( responseOpts ) {
95+ willRespondWith ( responseOpts ) {
9696 var status = responseOpts . status
9797 var headers = responseOpts . headers
9898 var body = responseOpts . body
@@ -112,7 +112,7 @@ module.exports = class Interaction {
112112 * Returns the interaction object created.
113113 * @returns {Object }
114114 */
115- json ( ) {
115+ json ( ) {
116116 return this . state
117117 }
118118}
0 commit comments