boxx_client 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +109 -0
  4. data/Rakefile +8 -0
  5. data/boxx_client.gemspec +46 -0
  6. data/dist/boxx_client-1.4.0.gem +0 -0
  7. data/dist/examples/upload_customer.rb +76 -0
  8. data/dist/examples/upload_product.rb +54 -0
  9. data/dist/examples/upload_transaction.rb +56 -0
  10. data/docs/DeleteAll.md +10 -0
  11. data/docs/DeleteAllApi.md +56 -0
  12. data/docs/DeleteSpecific.md +11 -0
  13. data/docs/DeleteSpecificApi.md +56 -0
  14. data/docs/InlineResponse200.md +9 -0
  15. data/docs/InlineResponse2001.md +9 -0
  16. data/docs/InlineResponse2001Response.md +9 -0
  17. data/docs/InlineResponse200Response.md +11 -0
  18. data/docs/InlineResponse400.md +9 -0
  19. data/docs/InlineResponse4001.md +9 -0
  20. data/docs/UploadCustomer.md +14 -0
  21. data/docs/UploadCustomerDeviceTokens.md +11 -0
  22. data/docs/UploadCustomerMobileTokens.md +10 -0
  23. data/docs/UploadCustomerRequest.md +11 -0
  24. data/docs/UploadDataApi.md +149 -0
  25. data/docs/UploadOkResponse.md +9 -0
  26. data/docs/UploadOkResponseResult.md +11 -0
  27. data/docs/UploadProduct.md +13 -0
  28. data/docs/UploadProductRequest.md +11 -0
  29. data/docs/UploadTransaction.md +16 -0
  30. data/docs/UploadTransactionRequest.md +11 -0
  31. data/git_push.sh +55 -0
  32. data/lib/boxx_client.rb +60 -0
  33. data/lib/boxx_client/api/delete_all_api.rb +78 -0
  34. data/lib/boxx_client/api/delete_specific_api.rb +78 -0
  35. data/lib/boxx_client/api/upload_data_api.rb +188 -0
  36. data/lib/boxx_client/api_client.rb +388 -0
  37. data/lib/boxx_client/api_error.rb +38 -0
  38. data/lib/boxx_client/configuration.rb +202 -0
  39. data/lib/boxx_client/models/delete_all.rb +224 -0
  40. data/lib/boxx_client/models/delete_specific.rb +241 -0
  41. data/lib/boxx_client/models/inline_response_200.rb +197 -0
  42. data/lib/boxx_client/models/inline_response_200_1.rb +197 -0
  43. data/lib/boxx_client/models/inline_response_200_1_response.rb +199 -0
  44. data/lib/boxx_client/models/inline_response_200_response.rb +217 -0
  45. data/lib/boxx_client/models/inline_response_400.rb +197 -0
  46. data/lib/boxx_client/models/inline_response_400_1.rb +197 -0
  47. data/lib/boxx_client/models/upload_customer.rb +255 -0
  48. data/lib/boxx_client/models/upload_customer_device_tokens.rb +215 -0
  49. data/lib/boxx_client/models/upload_customer_mobile_tokens.rb +206 -0
  50. data/lib/boxx_client/models/upload_customer_request.rb +236 -0
  51. data/lib/boxx_client/models/upload_ok_response.rb +197 -0
  52. data/lib/boxx_client/models/upload_ok_response_result.rb +217 -0
  53. data/lib/boxx_client/models/upload_product.rb +244 -0
  54. data/lib/boxx_client/models/upload_product_request.rb +236 -0
  55. data/lib/boxx_client/models/upload_transaction.rb +279 -0
  56. data/lib/boxx_client/models/upload_transaction_request.rb +236 -0
  57. data/lib/boxx_client/version.rb +15 -0
  58. data/spec/api/delete_all_api_spec.rb +47 -0
  59. data/spec/api/delete_specific_api_spec.rb +47 -0
  60. data/spec/api/upload_data_api_spec.rb +71 -0
  61. data/spec/api_client_spec.rb +226 -0
  62. data/spec/configuration_spec.rb +42 -0
  63. data/spec/models/delete_all_spec.rb +54 -0
  64. data/spec/models/delete_specific_spec.rb +60 -0
  65. data/spec/models/inline_response_200_1_response_spec.rb +48 -0
  66. data/spec/models/inline_response_200_1_spec.rb +48 -0
  67. data/spec/models/inline_response_200_response_spec.rb +60 -0
  68. data/spec/models/inline_response_200_spec.rb +48 -0
  69. data/spec/models/inline_response_400_1_spec.rb +48 -0
  70. data/spec/models/inline_response_400_spec.rb +48 -0
  71. data/spec/models/upload_customer_device_tokens_spec.rb +60 -0
  72. data/spec/models/upload_customer_mobile_tokens_spec.rb +54 -0
  73. data/spec/models/upload_customer_request_spec.rb +60 -0
  74. data/spec/models/upload_customer_spec.rb +78 -0
  75. data/spec/models/upload_ok_response_result_spec.rb +60 -0
  76. data/spec/models/upload_ok_response_spec.rb +48 -0
  77. data/spec/models/upload_product_request_spec.rb +60 -0
  78. data/spec/models/upload_product_spec.rb +72 -0
  79. data/spec/models/upload_transaction_request_spec.rb +60 -0
  80. data/spec/models/upload_transaction_spec.rb +90 -0
  81. data/spec/spec_helper.rb +111 -0
  82. metadata +327 -0
@@ -0,0 +1,56 @@
1
+ # SwaggerClient::DeleteSpecificApi
2
+
3
+ All URIs are relative to *http://data.boxx.ai*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**api_data_delete_delete**](DeleteSpecificApi.md#api_data_delete_delete) | **DELETE** /api/data/delete/ | Delete selected documents
8
+
9
+
10
+ # **api_data_delete_delete**
11
+ > InlineResponse200 api_data_delete_delete(request_data)
12
+
13
+ Delete selected documents
14
+
15
+ It will delete all rows/documents whose ids are specified in the ‘data’ parameter of request.
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'boxx_client'
21
+
22
+ api_instance = SwaggerClient::DeleteSpecificApi.new
23
+
24
+ request_data = SwaggerClient::DeleteSpecific.new # DeleteSpecific | request data
25
+
26
+
27
+ begin
28
+ #Delete selected documents
29
+ result = api_instance.api_data_delete_delete(request_data)
30
+ p result
31
+ rescue SwaggerClient::ApiError => e
32
+ puts "Exception when calling DeleteSpecificApi->api_data_delete_delete: #{e}"
33
+ end
34
+ ```
35
+
36
+ ### Parameters
37
+
38
+ Name | Type | Description | Notes
39
+ ------------- | ------------- | ------------- | -------------
40
+ **request_data** | [**DeleteSpecific**](DeleteSpecific.md)| request data |
41
+
42
+ ### Return type
43
+
44
+ [**InlineResponse200**](InlineResponse200.md)
45
+
46
+ ### Authorization
47
+
48
+ No authorization required
49
+
50
+ ### HTTP request headers
51
+
52
+ - **Content-Type**: application/json
53
+ - **Accept**: application/json
54
+
55
+
56
+
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::InlineResponse200
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error_status** | **BOOLEAN** | | [optional]
7
+ **response** | [**InlineResponse200Response**](InlineResponse200Response.md) | | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::InlineResponse2001
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error_status** | **BOOLEAN** | | [optional]
7
+ **response** | [**InlineResponse2001Response**](InlineResponse2001Response.md) | | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::InlineResponse2001Response
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **failed_items** | **Array<String>** | | [optional]
7
+ **delete_items** | **Integer** | | [optional]
8
+
9
+
@@ -0,0 +1,11 @@
1
+ # SwaggerClient::InlineResponse200Response
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **total_items** | **Integer** | | [optional]
7
+ **failed_items** | **Array<Integer>** | | [optional]
8
+ **delete_items** | **Integer** | | [optional]
9
+ **found_items** | **Integer** | | [optional]
10
+
11
+
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::InlineResponse400
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **status** | **Integer** | | [optional]
7
+ **result** | **String** | | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::InlineResponse4001
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error_status** | **BOOLEAN** | | [optional]
7
+ **response** | **String** | | [optional]
8
+
9
+
@@ -0,0 +1,14 @@
1
+ # SwaggerClient::UploadCustomer
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **customerid** | **String** | |
7
+ **properties** | **Hash<String, Object>** | | [optional]
8
+ **email** | **String** | | [optional]
9
+ **phone** | **String** | | [optional]
10
+ **location** | **Array<String>** | | [optional]
11
+ **device_tokens** | [**Array<UploadCustomerDeviceTokens>**](UploadCustomerDeviceTokens.md) | | [optional]
12
+ **mobile_tokens** | [**Array<UploadCustomerMobileTokens>**](UploadCustomerMobileTokens.md) | | [optional]
13
+
14
+
@@ -0,0 +1,11 @@
1
+ # SwaggerClient::UploadCustomerDeviceTokens
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **endpoint** | **String** | | [optional]
7
+ **p256dh** | **String** | | [optional]
8
+ **auth** | **String** | | [optional]
9
+ **browser** | **String** | | [optional]
10
+
11
+
@@ -0,0 +1,10 @@
1
+ # SwaggerClient::UploadCustomerMobileTokens
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **device_registration** | **String** | | [optional]
7
+ **device_platform** | **String** | | [optional]
8
+ **source** | **String** | | [optional]
9
+
10
+
@@ -0,0 +1,11 @@
1
+ # SwaggerClient::UploadCustomerRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **client_id** | **String** | client id of the user |
7
+ **access_token** | **String** | access token of the user |
8
+ **data** | [**Array<UploadCustomer>**](UploadCustomer.md) | |
9
+ **data_format** | **Hash<String, String>** | | [optional]
10
+
11
+
@@ -0,0 +1,149 @@
1
+ # SwaggerClient::UploadDataApi
2
+
3
+ All URIs are relative to *http://data.boxx.ai*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**api_upload_customer_put**](UploadDataApi.md#api_upload_customer_put) | **PUT** /api/upload/customer/ |
8
+ [**api_upload_product_put**](UploadDataApi.md#api_upload_product_put) | **PUT** /api/upload/product/ |
9
+ [**api_upload_transaction_put**](UploadDataApi.md#api_upload_transaction_put) | **PUT** /api/upload/transaction/ |
10
+
11
+
12
+ # **api_upload_customer_put**
13
+ > UploadOkResponse api_upload_customer_put(request_data)
14
+
15
+
16
+
17
+ Upload Customer Data
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'boxx_client'
23
+
24
+ api_instance = SwaggerClient::UploadDataApi.new
25
+
26
+ request_data = SwaggerClient::UploadCustomerRequest.new # UploadCustomerRequest | request data
27
+
28
+
29
+ begin
30
+ result = api_instance.api_upload_customer_put(request_data)
31
+ p result
32
+ rescue SwaggerClient::ApiError => e
33
+ puts "Exception when calling UploadDataApi->api_upload_customer_put: #{e}"
34
+ end
35
+ ```
36
+
37
+ ### Parameters
38
+
39
+ Name | Type | Description | Notes
40
+ ------------- | ------------- | ------------- | -------------
41
+ **request_data** | [**UploadCustomerRequest**](UploadCustomerRequest.md)| request data |
42
+
43
+ ### Return type
44
+
45
+ [**UploadOkResponse**](UploadOkResponse.md)
46
+
47
+ ### Authorization
48
+
49
+ No authorization required
50
+
51
+ ### HTTP request headers
52
+
53
+ - **Content-Type**: application/json
54
+ - **Accept**: application/json
55
+
56
+
57
+
58
+ # **api_upload_product_put**
59
+ > UploadOkResponse api_upload_product_put(request_data)
60
+
61
+
62
+
63
+ Upload Product Data
64
+
65
+ ### Example
66
+ ```ruby
67
+ # load the gem
68
+ require 'boxx_client'
69
+
70
+ api_instance = SwaggerClient::UploadDataApi.new
71
+
72
+ request_data = SwaggerClient::UploadProductRequest.new # UploadProductRequest | request data
73
+
74
+
75
+ begin
76
+ result = api_instance.api_upload_product_put(request_data)
77
+ p result
78
+ rescue SwaggerClient::ApiError => e
79
+ puts "Exception when calling UploadDataApi->api_upload_product_put: #{e}"
80
+ end
81
+ ```
82
+
83
+ ### Parameters
84
+
85
+ Name | Type | Description | Notes
86
+ ------------- | ------------- | ------------- | -------------
87
+ **request_data** | [**UploadProductRequest**](UploadProductRequest.md)| request data |
88
+
89
+ ### Return type
90
+
91
+ [**UploadOkResponse**](UploadOkResponse.md)
92
+
93
+ ### Authorization
94
+
95
+ No authorization required
96
+
97
+ ### HTTP request headers
98
+
99
+ - **Content-Type**: application/json
100
+ - **Accept**: application/json
101
+
102
+
103
+
104
+ # **api_upload_transaction_put**
105
+ > UploadOkResponse api_upload_transaction_put(request_data)
106
+
107
+
108
+
109
+ Upload Transaction Data
110
+
111
+ ### Example
112
+ ```ruby
113
+ # load the gem
114
+ require 'boxx_client'
115
+
116
+ api_instance = SwaggerClient::UploadDataApi.new
117
+
118
+ request_data = SwaggerClient::UploadTransactionRequest.new # UploadTransactionRequest | request data
119
+
120
+
121
+ begin
122
+ result = api_instance.api_upload_transaction_put(request_data)
123
+ p result
124
+ rescue SwaggerClient::ApiError => e
125
+ puts "Exception when calling UploadDataApi->api_upload_transaction_put: #{e}"
126
+ end
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+ Name | Type | Description | Notes
132
+ ------------- | ------------- | ------------- | -------------
133
+ **request_data** | [**UploadTransactionRequest**](UploadTransactionRequest.md)| request data |
134
+
135
+ ### Return type
136
+
137
+ [**UploadOkResponse**](UploadOkResponse.md)
138
+
139
+ ### Authorization
140
+
141
+ No authorization required
142
+
143
+ ### HTTP request headers
144
+
145
+ - **Content-Type**: application/json
146
+ - **Accept**: application/json
147
+
148
+
149
+
@@ -0,0 +1,9 @@
1
+ # SwaggerClient::UploadOkResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **status** | **Integer** | | [optional]
7
+ **result** | [**UploadOkResponseResult**](UploadOkResponseResult.md) | | [optional]
8
+
9
+
@@ -0,0 +1,11 @@
1
+ # SwaggerClient::UploadOkResponseResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **total** | **Integer** | | [optional]
7
+ **failed** | **Array<String>** | | [optional]
8
+ **inserted** | **Integer** | | [optional]
9
+ **updated** | **Integer** | | [optional]
10
+
11
+
@@ -0,0 +1,13 @@
1
+ # SwaggerClient::UploadProduct
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **productid** | **String** | |
7
+ **active** | **BOOLEAN** | | [optional] [default to false]
8
+ **start_date** | **String** | | [optional]
9
+ **end_date** | **String** | | [optional]
10
+ **location** | **Array<String>** | | [optional]
11
+ **properties** | **Hash<String, Object>** | | [optional]
12
+
13
+
@@ -0,0 +1,11 @@
1
+ # SwaggerClient::UploadProductRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **client_id** | **String** | client id of the user |
7
+ **access_token** | **String** | access token of the user |
8
+ **data** | [**Array<UploadProduct>**](UploadProduct.md) | |
9
+ **data_format** | **Hash<String, String>** | | [optional]
10
+
11
+
@@ -0,0 +1,16 @@
1
+ # SwaggerClient::UploadTransaction
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **customerid** | **String** | | [optional]
7
+ **cookieid** | **String** | | [optional]
8
+ **boxx_token_id** | **String** | | [optional]
9
+ **properties** | **Hash<String, Object>** | | [optional]
10
+ **transactionid** | **String** | | [optional]
11
+ **productid** | **String** | |
12
+ **type** | **String** | |
13
+ **transactiondate** | **String** | |
14
+ **location** | **Array<String>** | | [optional]
15
+
16
+
@@ -0,0 +1,11 @@
1
+ # SwaggerClient::UploadTransactionRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **client_id** | **String** | client id of the user |
7
+ **access_token** | **String** | access token of the user |
8
+ **data** | [**Array<UploadTransaction>**](UploadTransaction.md) | |
9
+ **data_format** | **Hash<String, String>** | | [optional]
10
+
11
+
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id=""
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id=""
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note=""
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+