reference_service 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +126 -0
  5. data/Rakefile +10 -0
  6. data/docs/ActiveSubscription.md +27 -0
  7. data/docs/Error.md +17 -0
  8. data/docs/ErrorErrors.md +17 -0
  9. data/docs/ErrorErrorsError.md +25 -0
  10. data/docs/ReportsApi.md +168 -0
  11. data/docs/Sector.md +19 -0
  12. data/docs/SectorApi.md +100 -0
  13. data/docs/SectorSpending.md +23 -0
  14. data/docs/SpendingReport.md +23 -0
  15. data/docs/SubscribeApi.md +244 -0
  16. data/docs/Subscription.md +17 -0
  17. data/docs/SubscriptionObject.md +27 -0
  18. data/docs/SubscriptionPaymentCard.md +21 -0
  19. data/docs/SubscriptionResponse.md +19 -0
  20. data/docs/TopLocationsReport.md +17 -0
  21. data/docs/UnsubscribedResponse.md +19 -0
  22. data/git_push.sh +55 -0
  23. data/lib/openapi_client.rb +55 -0
  24. data/lib/openapi_client/api/reports_api.rb +252 -0
  25. data/lib/openapi_client/api/sector_api.rb +151 -0
  26. data/lib/openapi_client/api/subscribe_api.rb +334 -0
  27. data/lib/openapi_client/api_client.rb +386 -0
  28. data/lib/openapi_client/api_error.rb +57 -0
  29. data/lib/openapi_client/configuration.rb +244 -0
  30. data/lib/openapi_client/models/active_subscription.rb +262 -0
  31. data/lib/openapi_client/models/error.rb +201 -0
  32. data/lib/openapi_client/models/error_errors.rb +203 -0
  33. data/lib/openapi_client/models/error_errors_error.rb +232 -0
  34. data/lib/openapi_client/models/sector.rb +216 -0
  35. data/lib/openapi_client/models/sector_spending.rb +244 -0
  36. data/lib/openapi_client/models/spending_report.rb +235 -0
  37. data/lib/openapi_client/models/subscription.rb +197 -0
  38. data/lib/openapi_client/models/subscription_object.rb +247 -0
  39. data/lib/openapi_client/models/subscription_payment_card.rb +254 -0
  40. data/lib/openapi_client/models/subscription_response.rb +206 -0
  41. data/lib/openapi_client/models/top_locations_report.rb +200 -0
  42. data/lib/openapi_client/models/unsubscribed_response.rb +207 -0
  43. data/lib/openapi_client/version.rb +15 -0
  44. data/openapi_client.gemspec +38 -0
  45. data/spec/api/reports_api_spec.rb +77 -0
  46. data/spec/api/sector_api_spec.rb +58 -0
  47. data/spec/api/subscribe_api_spec.rb +92 -0
  48. data/spec/api_client_spec.rb +226 -0
  49. data/spec/configuration_spec.rb +42 -0
  50. data/spec/models/active_subscription_spec.rb +71 -0
  51. data/spec/models/error_errors_error_spec.rb +65 -0
  52. data/spec/models/error_errors_spec.rb +41 -0
  53. data/spec/models/error_spec.rb +41 -0
  54. data/spec/models/sector_spec.rb +47 -0
  55. data/spec/models/sector_spending_spec.rb +59 -0
  56. data/spec/models/spending_report_spec.rb +59 -0
  57. data/spec/models/subscription_object_spec.rb +71 -0
  58. data/spec/models/subscription_payment_card_spec.rb +53 -0
  59. data/spec/models/subscription_response_spec.rb +47 -0
  60. data/spec/models/subscription_spec.rb +41 -0
  61. data/spec/models/top_locations_report_spec.rb +41 -0
  62. data/spec/models/unsubscribed_response_spec.rb +47 -0
  63. data/spec/spec_helper.rb +111 -0
  64. metadata +199 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1b67add4f6e4d5be9618a7a39a369b10b471a97084c20f08f6c7171c82fad7bd
4
+ data.tar.gz: 5b127d834f258d70fab6f43dace0fa67bf4a882a8eb31cedd5038f72eea2dc8a
5
+ SHA512:
6
+ metadata.gz: c4a650dfa54435162ad16abeb34f6343e98fade5059e7e6b719c56d9209a395fd1d0edb1befb7503e50ae9cde2ebf3c950fe13d261f807e5d0aea112a2213dc0
7
+ data.tar.gz: 72ecc9262d72dade474534ced8f181682febedae22660902484d5ae5aaa07d638ce6017488d785a86d9dff008835992ec47a5288fa243de73ddeb2e1264fb1e7
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
@@ -0,0 +1,79 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ openapi_client (1.0.0)
5
+ json (~> 2.1, >= 2.1.0)
6
+ typhoeus (~> 1.0, >= 1.0.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ZenTest (4.11.2)
12
+ addressable (2.5.2)
13
+ public_suffix (>= 2.0.2, < 4.0)
14
+ autotest (4.4.6)
15
+ ZenTest (>= 4.4.1)
16
+ autotest-fsevent (0.2.14)
17
+ sys-uname
18
+ autotest-growl (0.2.16)
19
+ autotest-rails-pure (4.1.2)
20
+ byebug (10.0.2)
21
+ coderay (1.1.2)
22
+ crack (0.4.3)
23
+ safe_yaml (~> 1.0.0)
24
+ diff-lcs (1.3)
25
+ ethon (0.11.0)
26
+ ffi (>= 1.3.0)
27
+ ffi (1.9.25)
28
+ hashdiff (0.3.7)
29
+ json (2.1.0)
30
+ method_source (0.9.0)
31
+ pry (0.11.3)
32
+ coderay (~> 1.1.0)
33
+ method_source (~> 0.9.0)
34
+ pry-byebug (3.6.0)
35
+ byebug (~> 10.0)
36
+ pry (~> 0.10)
37
+ public_suffix (3.0.3)
38
+ rake (12.0.0)
39
+ rspec (3.8.0)
40
+ rspec-core (~> 3.8.0)
41
+ rspec-expectations (~> 3.8.0)
42
+ rspec-mocks (~> 3.8.0)
43
+ rspec-core (3.8.0)
44
+ rspec-support (~> 3.8.0)
45
+ rspec-expectations (3.8.1)
46
+ diff-lcs (>= 1.2.0, < 2.0)
47
+ rspec-support (~> 3.8.0)
48
+ rspec-mocks (3.8.0)
49
+ diff-lcs (>= 1.2.0, < 2.0)
50
+ rspec-support (~> 3.8.0)
51
+ rspec-support (3.8.0)
52
+ safe_yaml (1.0.4)
53
+ sys-uname (1.0.3)
54
+ ffi (>= 1.0.0)
55
+ typhoeus (1.3.0)
56
+ ethon (>= 0.9.0)
57
+ vcr (3.0.3)
58
+ webmock (1.24.6)
59
+ addressable (>= 2.3.6)
60
+ crack (>= 0.3.2)
61
+ hashdiff
62
+
63
+ PLATFORMS
64
+ ruby
65
+
66
+ DEPENDENCIES
67
+ autotest (~> 4.4, >= 4.4.6)
68
+ autotest-fsevent (~> 0.2, >= 0.2.12)
69
+ autotest-growl (~> 0.2, >= 0.2.16)
70
+ autotest-rails-pure (~> 4.1, >= 4.1.2)
71
+ openapi_client!
72
+ pry-byebug
73
+ rake (~> 12.0.0)
74
+ rspec (~> 3.6, >= 3.6.0)
75
+ vcr (~> 3.0, >= 3.0.1)
76
+ webmock (~> 1.24, >= 1.24.3)
77
+
78
+ BUNDLED WITH
79
+ 1.16.1
@@ -0,0 +1,126 @@
1
+ # openapi_client
2
+
3
+ OpenapiClient - the Ruby gem for the Golden Service API
4
+
5
+ An API that conforms to the standards and best practices that should be adhered to
6
+ in all Mastercard owned APIs. Can be used to create subscriptions to reports that are
7
+ generated twice daily (6am & 6pm) that deliver e-commerce spending across multiple sectors and locations.
8
+ <br/>
9
+ ---
10
+ * **All requests must be signed using oauth 1.0a. Please refer to: https://developer.mastercard.com/platform/documentation/using-oauth-1a-to-access-mastercard-apis/**
11
+ ---
12
+ * **The user must provide their card details when creating a subscription. These details must be
13
+ encrypted before entering transit. Please refer to [Mastercard security](https://stage.developer.mastercard.com/platform/documentation/securing-sensitive-data-using-payload-encryption/)**
14
+ ---
15
+
16
+
17
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
18
+
19
+ - API version: 1.1.0
20
+ - Package version: 1.0.0
21
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
22
+ For more information, please visit [https://developer.mastercard.com/](https://developer.mastercard.com/)
23
+
24
+ ## Installation
25
+
26
+ ### Build a gem
27
+
28
+ To build the Ruby code into a gem:
29
+
30
+ ```shell
31
+ gem build openapi_client.gemspec
32
+ ```
33
+
34
+ Then either install the gem locally:
35
+
36
+ ```shell
37
+ gem install ./openapi_client-1.0.0.gem
38
+ ```
39
+
40
+ (for development, run `gem install --dev ./openapi_client-1.0.0.gem` to install the development dependencies)
41
+
42
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
43
+
44
+ Finally add this to the Gemfile:
45
+
46
+ gem 'openapi_client', '~> 1.0.0'
47
+
48
+ ### Install from Git
49
+
50
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
51
+
52
+ gem 'openapi_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
53
+
54
+ ### Include the Ruby code directly
55
+
56
+ Include the Ruby code directly using `-I` as follows:
57
+
58
+ ```shell
59
+ ruby -Ilib script.rb
60
+ ```
61
+
62
+ ## Getting Started
63
+
64
+ Please follow the [installation](#installation) procedure and then run the following code:
65
+
66
+ ```ruby
67
+ # Load the gem
68
+ require 'openapi_client'
69
+
70
+ api_instance = OpenapiClient::ReportsApi.new
71
+ date = Date.parse('29/02/2019') # Date | The date for the requested data
72
+ location = 'New York' # String | The location for which you wish to receive the top-sectors report.
73
+ spending_type = 'ATV' # String | Used to distinguish between gross spending (GS) & average transaction value (ATV)
74
+ opts = {
75
+ sector: 0 # Integer | The sector for which you wish to receive reports. Sector ids can be retrieved from sectors call
76
+ }
77
+
78
+ begin
79
+ #Retrieves e-commerce spending for a particular location, sector and date range or single date
80
+ result = api_instance.get_spending(date, location, spending_type, opts)
81
+ p result
82
+ rescue OpenapiClient::ApiError => e
83
+ puts "Exception when calling ReportsApi->get_spending: #{e}"
84
+ end
85
+
86
+ ```
87
+
88
+ ## Documentation for API Endpoints
89
+
90
+ All URIs are relative to *https://stage.api.mastercard.com/golden-service*
91
+
92
+ Class | Method | HTTP request | Description
93
+ ------------ | ------------- | ------------- | -------------
94
+ *OpenapiClient::ReportsApi* | [**get_spending**](docs/ReportsApi.md#get_spending) | **GET** /spending-reports | Retrieves e-commerce spending for a particular location, sector and date range or single date
95
+ *OpenapiClient::ReportsApi* | [**get_top_locations**](docs/ReportsApi.md#get_top_locations) | **GET** /top-locations | Retrieves the top grossing locations for the specified date/sector/spending type
96
+ *OpenapiClient::ReportsApi* | [**get_top_sectors**](docs/ReportsApi.md#get_top_sectors) | **GET** /top-sectors | Retrieves the top grossing sectors for the specified date & location
97
+ *OpenapiClient::SectorApi* | [**get_sectors**](docs/SectorApi.md#get_sectors) | **GET** /sectors | Returns the valid sectors which can be passed to various other endpoints in the sector field
98
+ *OpenapiClient::SectorApi* | [**get_top_sectors**](docs/SectorApi.md#get_top_sectors) | **GET** /top-sectors | Retrieves the top grossing sectors for the specified date & location
99
+ *OpenapiClient::SubscribeApi* | [**get_subscription**](docs/SubscribeApi.md#get_subscription) | **GET** /subscriptions/{subscription_id} | Gets a specific subscription using a subscription Id passed as in the path
100
+ *OpenapiClient::SubscribeApi* | [**list_subscriptions**](docs/SubscribeApi.md#list_subscriptions) | **GET** /subscriptions | gets all active subscriptions for a particular user. Returned list size can be limited using the limit parameter
101
+ *OpenapiClient::SubscribeApi* | [**subscribe**](docs/SubscribeApi.md#subscribe) | **POST** /subscriptions | Allows the user to subscribe to a particular location and receive updates on e-commerce spending in their chosen area. The user can pay for the subscription on a daily basis. The user is charged for every report they receive until their subscription is cancelled
102
+ *OpenapiClient::SubscribeApi* | [**unsubscribe**](docs/SubscribeApi.md#unsubscribe) | **DELETE** /subscriptions | Un-subscribes from a specified subcription
103
+ *OpenapiClient::SubscribeApi* | [**update_subscription**](docs/SubscribeApi.md#update_subscription) | **PUT** /subscriptions | Updates an active subscription
104
+
105
+
106
+ ## Documentation for Models
107
+
108
+ - [OpenapiClient::ActiveSubscription](docs/ActiveSubscription.md)
109
+ - [OpenapiClient::Error](docs/Error.md)
110
+ - [OpenapiClient::ErrorErrors](docs/ErrorErrors.md)
111
+ - [OpenapiClient::ErrorErrorsError](docs/ErrorErrorsError.md)
112
+ - [OpenapiClient::Sector](docs/Sector.md)
113
+ - [OpenapiClient::SectorSpending](docs/SectorSpending.md)
114
+ - [OpenapiClient::SpendingReport](docs/SpendingReport.md)
115
+ - [OpenapiClient::Subscription](docs/Subscription.md)
116
+ - [OpenapiClient::SubscriptionObject](docs/SubscriptionObject.md)
117
+ - [OpenapiClient::SubscriptionPaymentCard](docs/SubscriptionPaymentCard.md)
118
+ - [OpenapiClient::SubscriptionResponse](docs/SubscriptionResponse.md)
119
+ - [OpenapiClient::TopLocationsReport](docs/TopLocationsReport.md)
120
+ - [OpenapiClient::UnsubscribedResponse](docs/UnsubscribedResponse.md)
121
+
122
+
123
+ ## Documentation for Authorization
124
+
125
+ All endpoints do not require authorization.
126
+
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,27 @@
1
+ # OpenapiClient::ActiveSubscription
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **email_address** | **String** | The email address of the active subscription | [optional]
8
+ **subscription_id** | **String** | The unique identifier of the subscription (Version 4 UUID) |
9
+ **location** | **String** | The location that reports are generated for as part of the subscription |
10
+ **sector** | [**Sector**](Sector.md) | |
11
+ **frequency** | **String** | b - Bi-Daily, d - Daily, w - Weekly | [optional]
12
+ **subscription_image** | **String** | An image that can be included as part of the subscription. MUST be sent in base64 format. | [optional]
13
+
14
+ ## Code Sample
15
+
16
+ ```ruby
17
+ require 'OpenapiClient'
18
+
19
+ instance = OpenapiClient::ActiveSubscription.new(email_address: testmail@mastercard.com,
20
+ subscription_id: cb9fa3cc-8a06-39af-b605-934799914275,
21
+ location: New York,
22
+ sector: null,
23
+ frequency: b,
24
+ subscription_image: null)
25
+ ```
26
+
27
+
@@ -0,0 +1,17 @@
1
+ # OpenapiClient::Error
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **errors** | [**ErrorErrors**](ErrorErrors.md) | |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'OpenapiClient'
13
+
14
+ instance = OpenapiClient::Error.new(errors: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,17 @@
1
+ # OpenapiClient::ErrorErrors
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **error** | [**Array&lt;ErrorErrorsError&gt;**](ErrorErrorsError.md) | |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'OpenapiClient'
13
+
14
+ instance = OpenapiClient::ErrorErrors.new(error: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,25 @@
1
+ # OpenapiClient::ErrorErrorsError
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **source** | **String** | | [optional]
8
+ **reason_code** | **String** | | [optional]
9
+ **description** | **String** | | [optional]
10
+ **recoverable** | **Boolean** | | [optional]
11
+ **details** | **String** | | [optional]
12
+
13
+ ## Code Sample
14
+
15
+ ```ruby
16
+ require 'OpenapiClient'
17
+
18
+ instance = OpenapiClient::ErrorErrorsError.new(source: Golden_Service,
19
+ reason_code: 400,
20
+ description: Bad Request,
21
+ recoverable: false,
22
+ details: Invalid email address)
23
+ ```
24
+
25
+
@@ -0,0 +1,168 @@
1
+ # OpenapiClient::ReportsApi
2
+
3
+ All URIs are relative to *https://stage.api.mastercard.com/golden-service*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_spending**](ReportsApi.md#get_spending) | **GET** /spending-reports | Retrieves e-commerce spending for a particular location, sector and date range or single date
8
+ [**get_top_locations**](ReportsApi.md#get_top_locations) | **GET** /top-locations | Retrieves the top grossing locations for the specified date/sector/spending type
9
+ [**get_top_sectors**](ReportsApi.md#get_top_sectors) | **GET** /top-sectors | Retrieves the top grossing sectors for the specified date &amp; location
10
+
11
+
12
+
13
+ ## get_spending
14
+
15
+ > SpendingReport get_spending(date, location, spending_type, opts)
16
+
17
+ Retrieves e-commerce spending for a particular location, sector and date range or single date
18
+
19
+ ### Example
20
+
21
+ ```ruby
22
+ # load the gem
23
+ require 'openapi_client'
24
+
25
+ api_instance = OpenapiClient::ReportsApi.new
26
+ date = Date.parse('29/02/2019') # Date | The date for the requested data
27
+ location = 'New York' # String | The location for which you wish to receive the top-sectors report.
28
+ spending_type = 'ATV' # String | Used to distinguish between gross spending (GS) & average transaction value (ATV)
29
+ opts = {
30
+ sector: 0 # Integer | The sector for which you wish to receive reports. Sector ids can be retrieved from sectors call
31
+ }
32
+
33
+ begin
34
+ #Retrieves e-commerce spending for a particular location, sector and date range or single date
35
+ result = api_instance.get_spending(date, location, spending_type, opts)
36
+ p result
37
+ rescue OpenapiClient::ApiError => e
38
+ puts "Exception when calling ReportsApi->get_spending: #{e}"
39
+ end
40
+ ```
41
+
42
+ ### Parameters
43
+
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **date** | **Date**| The date for the requested data |
48
+ **location** | **String**| The location for which you wish to receive the top-sectors report. |
49
+ **spending_type** | **String**| Used to distinguish between gross spending (GS) &amp; average transaction value (ATV) |
50
+ **sector** | **Integer**| The sector for which you wish to receive reports. Sector ids can be retrieved from sectors call | [optional]
51
+
52
+ ### Return type
53
+
54
+ [**SpendingReport**](SpendingReport.md)
55
+
56
+ ### Authorization
57
+
58
+ No authorization required
59
+
60
+ ### HTTP request headers
61
+
62
+ - **Content-Type**: Not defined
63
+ - **Accept**: application/json
64
+
65
+
66
+ ## get_top_locations
67
+
68
+ > TopLocationsReport get_top_locations(date, spending_type, opts)
69
+
70
+ Retrieves the top grossing locations for the specified date/sector/spending type
71
+
72
+ ### Example
73
+
74
+ ```ruby
75
+ # load the gem
76
+ require 'openapi_client'
77
+
78
+ api_instance = OpenapiClient::ReportsApi.new
79
+ date = Date.parse('29/02/2019') # Date | The date for the requested data
80
+ spending_type = 'ATV' # String | Used to distinguish between gross spending (GS) & average transaction value (ATV)
81
+ opts = {
82
+ sector: 0, # Integer | The sector for which you wish to receive reports. Sector ids can be retrieved from sectors call
83
+ limit: 5, # Integer | Can be used to limit the amount of results returned from a query (Pagination)
84
+ offset: 5 # Integer | The number of items to offset the start of the list from (Pagination)
85
+ }
86
+
87
+ begin
88
+ #Retrieves the top grossing locations for the specified date/sector/spending type
89
+ result = api_instance.get_top_locations(date, spending_type, opts)
90
+ p result
91
+ rescue OpenapiClient::ApiError => e
92
+ puts "Exception when calling ReportsApi->get_top_locations: #{e}"
93
+ end
94
+ ```
95
+
96
+ ### Parameters
97
+
98
+
99
+ Name | Type | Description | Notes
100
+ ------------- | ------------- | ------------- | -------------
101
+ **date** | **Date**| The date for the requested data |
102
+ **spending_type** | **String**| Used to distinguish between gross spending (GS) &amp; average transaction value (ATV) |
103
+ **sector** | **Integer**| The sector for which you wish to receive reports. Sector ids can be retrieved from sectors call | [optional]
104
+ **limit** | **Integer**| Can be used to limit the amount of results returned from a query (Pagination) | [optional]
105
+ **offset** | **Integer**| The number of items to offset the start of the list from (Pagination) | [optional]
106
+
107
+ ### Return type
108
+
109
+ [**TopLocationsReport**](TopLocationsReport.md)
110
+
111
+ ### Authorization
112
+
113
+ No authorization required
114
+
115
+ ### HTTP request headers
116
+
117
+ - **Content-Type**: Not defined
118
+ - **Accept**: application/json
119
+
120
+
121
+ ## get_top_sectors
122
+
123
+ > Array&lt;Array&gt; get_top_sectors(date, location, spending_type)
124
+
125
+ Retrieves the top grossing sectors for the specified date & location
126
+
127
+ ### Example
128
+
129
+ ```ruby
130
+ # load the gem
131
+ require 'openapi_client'
132
+
133
+ api_instance = OpenapiClient::ReportsApi.new
134
+ date = Date.parse('29/02/2019') # Date | The date for the requested data
135
+ location = 'New York' # String | The location for which you wish to receive the top-sectors report.
136
+ spending_type = 'ATV' # String | Used to distinguish between gross spending (GS) & average transaction value (ATV)
137
+
138
+ begin
139
+ #Retrieves the top grossing sectors for the specified date & location
140
+ result = api_instance.get_top_sectors(date, location, spending_type)
141
+ p result
142
+ rescue OpenapiClient::ApiError => e
143
+ puts "Exception when calling ReportsApi->get_top_sectors: #{e}"
144
+ end
145
+ ```
146
+
147
+ ### Parameters
148
+
149
+
150
+ Name | Type | Description | Notes
151
+ ------------- | ------------- | ------------- | -------------
152
+ **date** | **Date**| The date for the requested data |
153
+ **location** | **String**| The location for which you wish to receive the top-sectors report. |
154
+ **spending_type** | **String**| Used to distinguish between gross spending (GS) &amp; average transaction value (ATV) |
155
+
156
+ ### Return type
157
+
158
+ **Array&lt;Array&gt;**
159
+
160
+ ### Authorization
161
+
162
+ No authorization required
163
+
164
+ ### HTTP request headers
165
+
166
+ - **Content-Type**: Not defined
167
+ - **Accept**: application/json
168
+