MailchimpMarketing 3.0.1 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/MailchimpMarketing.gemspec +1 -1
  4. data/README.md +55 -46
  5. data/lib/MailchimpMarketing.rb +5 -6
  6. data/lib/MailchimpMarketing/api/activity_feed_api.rb +13 -69
  7. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +20 -113
  8. data/lib/MailchimpMarketing/api/automations_api.rb +130 -685
  9. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +33 -182
  10. data/lib/MailchimpMarketing/api/batches_api.rb +26 -146
  11. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +33 -182
  12. data/lib/MailchimpMarketing/api/campaigns_api.rb +144 -803
  13. data/lib/MailchimpMarketing/api/connected_sites_api.rb +32 -179
  14. data/lib/MailchimpMarketing/api/conversations_api.rb +36 -205
  15. data/lib/MailchimpMarketing/api/dashboard_api.rb +32 -221
  16. data/lib/MailchimpMarketing/api/ecommerce_api.rb +447 -2312
  17. data/lib/MailchimpMarketing/api/external_auths_api.rb +20 -113
  18. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +16 -83
  19. data/lib/MailchimpMarketing/api/file_manager_api.rb +71 -413
  20. data/lib/MailchimpMarketing/api/landing_pages_api.rb +51 -286
  21. data/lib/MailchimpMarketing/api/lists_api.rb +721 -2876
  22. data/lib/MailchimpMarketing/api/ping_api.rb +7 -33
  23. data/lib/MailchimpMarketing/api/postcards_api.rb +9 -41
  24. data/lib/MailchimpMarketing/api/reporting_api.rb +41 -237
  25. data/lib/MailchimpMarketing/api/reports_api.rb +153 -903
  26. data/lib/MailchimpMarketing/api/root_api.rb +7 -37
  27. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +8 -39
  28. data/lib/MailchimpMarketing/api/search_members_api.rb +8 -41
  29. data/lib/MailchimpMarketing/api/template_folders_api.rb +33 -182
  30. data/lib/MailchimpMarketing/api/templates_api.rb +40 -234
  31. data/lib/MailchimpMarketing/api/verified_domains_api.rb +32 -170
  32. data/lib/MailchimpMarketing/api_client.rb +94 -64
  33. data/lib/MailchimpMarketing/api_error.rb +4 -4
  34. data/lib/MailchimpMarketing/configuration.rb +1 -1
  35. data/lib/MailchimpMarketing/version.rb +2 -2
  36. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63bbaad5d213f6fc326818e55aad5b9dbc6a876c897356022fa89dab5fc1892a
4
- data.tar.gz: 2caa4cc62ee310c69a4c9cd761ebc672f8421ec4d29823c6111fb45212d3e83a
3
+ metadata.gz: e7345416325d95b973d89425c687838e5850879467255143fd42dfaa6a61f075
4
+ data.tar.gz: f9ad2549cf2395924d4f2697ab85fc6f91aeafbf543d9669c1379bee2e27aeac
5
5
  SHA512:
6
- metadata.gz: b23a23ee8bb7ed1d54ff09ea8cc92037c9793893547bc1417ec3113edac1415602349eb085bf6d14403ec3b64aaf38837c74b6b9bd4e8933b3470c6b88e814cf
7
- data.tar.gz: 017db71b1790e113031cbf8ec1738a8b2c9c9d55e0fec487b19bb269e91ce0c7e36df8a42ae7ec9e76fa0e83eed61270490bd0506d2f6cb8461a0de7fade7ed7
6
+ metadata.gz: 3869ca68063c42e747ef074e3ecf174ddff9cf41e11c18489abd49ac7fa1f0e6d7ff0573fa715c683bf6cd68faec2dd7218a6620611a86139b1768a3a3dc148b
7
+ data.tar.gz: 6ba1658ef9337abb5531ca4d503cc418348f263afbaa98a6763434eb074fe900feb094186c8bd13ab479fd42e4057aa906e81573f3b5a808d9ea5819b22a1ea2
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem 'rake', '~> 12.0.0'
6
+ gem 'rake', '~> 12.3.3'
7
7
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7
7
 
8
- OpenAPI spec version: 3.0.1
8
+ OpenAPI spec version: 3.0.8
9
9
  Contact: apihelp@mailchimp.com
10
10
  Generated by: https://github.com/swagger-api/swagger-codegen.git
11
11
  Swagger Codegen version: 2.4.12
data/README.md CHANGED
@@ -1,42 +1,27 @@
1
- # Mailchimp Marketing SDK — Ruby
1
+ # Mailchimp Marketing — Ruby
2
2
 
3
- The official Ruby SDK for the Mailchimp Marketing API (v1)
3
+ The official Ruby client library for the Mailchimp Marketing API (v1)
4
4
 
5
5
  ## Installation
6
6
 
7
- ### Build a gem
8
-
9
- To build the Ruby code into a gem:
7
+ ### via RubyGems
10
8
 
11
9
  ```shell
12
- gem build MailchimpMarketing.gemspec
10
+ gem install MailchimpMarketing
13
11
  ```
14
12
 
15
- Then either install the gem locally:
13
+ ### via Git
16
14
 
17
15
  ```shell
18
- gem install ./MailchimpMarketing-3.0.1.gem
16
+ gem 'MailchimpMarketing', :git => 'https://github.com/mailchimp/mailchimp-marketing-ruby.git'
19
17
  ```
20
- (for development, run `gem install --dev ./MailchimpMarketing-3.0.1.gem` to install the development dependencies)
21
-
22
- or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
23
-
24
- Finally add this to the Gemfile:
25
-
26
- gem 'MailchimpMarketing', '~> 3.0.1'
27
-
28
- ### Install from Git
29
18
 
30
- If the Ruby gem is hosted at a git repository: https://github.com/postlight/mailchimp-marketing-ruby, then add the following in the Gemfile:
31
-
32
- gem 'MailchimpMarketing', :git => 'https://github.com/postlight/mailchimp-marketing-ruby.git'
33
-
34
- ### Include the Ruby code directly
35
-
36
- Include the Ruby code directly using `-I` as follows:
19
+ ### via Local Installation
37
20
 
38
21
  ```shell
39
- ruby -Ilib script.rb
22
+ gem build MailchimpMarketing.gemspec
23
+ gem install ./MailchimpMarketing-3.0.8.gem
24
+ gem 'MailchimpMarketing', '~> 3.0.8'
40
25
  ```
41
26
 
42
27
  ## Quick Start
@@ -46,7 +31,10 @@ require 'MailchimpMarketing'
46
31
 
47
32
  begin
48
33
  client = MailchimpMarketing::Client.new()
49
- client.set_config(ENV['API_KEY'], ENV['API_SERVER'])
34
+ client.set_config({
35
+ :api_key => 'YOUR_API_KEY',
36
+ :server => 'YOUR_SERVER_PREFIX'
37
+ })
50
38
  result = client.ping.get()
51
39
  p result
52
40
  rescue MailchimpMarketing::ApiError => e
@@ -54,17 +42,44 @@ rescue MailchimpMarketing::ApiError => e
54
42
  end
55
43
  ```
56
44
 
57
- If your api key contains a server suffix (i.e. '-us19'), passing in the server key may be omitted, like so:
45
+ ## Authentication Methods
46
+
47
+ The client library can be configured to use either **Basic Auth** or **OAuth2**. A server prefix should be provided i.e. `us19`, in order for the client to determine to appropriate host url.
48
+
49
+ ### Basic Auth
50
+
51
+ ```ruby
52
+ client.set_config({
53
+ :api_key => 'YOUR_API_KEY',
54
+ :server => 'YOUR_SERVER_PREFIX'
55
+ })
56
+ ```
57
+
58
+ ### OAuth2
59
+
60
+ ```ruby
61
+ client.set_config({
62
+ :access_token => 'YOUR_ACCESS_TOKEN',
63
+ :server => 'YOUR_SERVER_PREFIX'
64
+ })
65
+ ```
66
+
67
+ ### Shorthand
68
+
69
+ As a shortcut, the configuration object can be passed in directly when creating the client.
58
70
 
59
- ```python
60
- client.setConfig(ENV['API_KEY'])
71
+ ```ruby
72
+ client = MailchimpMarketing::Client.new({
73
+ :api_key => 'YOUR_API_KEY',
74
+ :server => 'YOUR_SERVER_PREFIX'
75
+ })
61
76
  ```
62
77
 
63
78
  ## API Endpoints
64
79
 
65
80
  All URIs are relative to *https://server.api.mailchimp.com/3.0*
66
81
 
67
- | SDK Method | Endpoint |
82
+ | Method | Endpoint |
68
83
  | ---------- | -------- |
69
84
  | **activityFeed.get** | /activity-feed |
70
85
  | **activityFeed.get_chimp_chatter** | /activity-feed/chimp-chatter |
@@ -342,28 +357,22 @@ All URIs are relative to *https://server.api.mailchimp.com/3.0*
342
357
  | **verifiedDomains.submit_domain_verification** | /verified-domains/{domain_name}/actions/verify |
343
358
 
344
359
 
345
- ## Additional SDKs
360
+ ## Additional Client Libraries
346
361
 
347
- Mailchimp Marketing SDKs are available in a number of additional languages.
362
+ Mailchimp Marketing libraries are available in the following languages:
348
363
 
349
364
  <div>
350
- <a href="https://github.com/postlight/mailchimp-marketing-node">
351
- <img src="https://github.com/postlight/mailchimp/blob/master/resources/images/lang_node.png?raw=true" width="44" height="44">
352
- </a>
353
- <a href="https://github.com/postlight/mailchimp-marketing-php">
354
- <img src="https://github.com/postlight/mailchimp/blob/master/resources/images/lang_php.png?raw=true" width="44" height="44">
355
- </a>
356
- <a href="https://github.com/postlight/mailchimp-marketing-ruby">
357
- <img src="https://github.com/postlight/mailchimp/blob/master/resources/images/lang_ruby.png?raw=true" width="44" height="44">
365
+ <a href="https://github.com/mailchimp/mailchimp-marketing-node">
366
+ <img src="https://github.com/mailchimp/mailchimp-client-lib-codegen/blob/master/resources/images/lang_node.png?raw=true" width="44" height="44">
358
367
  </a>
359
- <a href="https://github.com/postlight/mailchimp-marketing-python">
360
- <img src="https://github.com/postlight/mailchimp/blob/master/resources/images/lang_python.png?raw=true" width="44" height="44">
368
+ <a href="https://github.com/mailchimp/mailchimp-marketing-php">
369
+ <img src="https://github.com/mailchimp/mailchimp-client-lib-codegen/blob/master/resources/images/lang_php.png?raw=true" width="44" height="44">
361
370
  </a>
362
- <a href="https://github.com/postlight/mailchimp-marketing-java">
363
- <img src="https://github.com/postlight/mailchimp/blob/master/resources/images/lang_java.png?raw=true" width="44" height="44">
371
+ <a href="https://github.com/mailchimp/mailchimp-marketing-ruby">
372
+ <img src="https://github.com/mailchimp/mailchimp-client-lib-codegen/blob/master/resources/images/lang_ruby.png?raw=true" width="44" height="44">
364
373
  </a>
365
- <a href="https://github.com/postlight/mailchimp-marketing-csharp">
366
- <img src="https://github.com/postlight/mailchimp/blob/master/resources/images/lang_csharp.png?raw=true" width="44" height="44">
374
+ <a href="https://github.com/mailchimp/mailchimp-marketing-python">
375
+ <img src="https://github.com/mailchimp/mailchimp-client-lib-codegen/blob/master/resources/images/lang_python.png?raw=true" width="44" height="44">
367
376
  </a>
368
377
  </div>
369
378
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.1
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -15,7 +15,6 @@ require 'MailchimpMarketing/api_client'
15
15
  require 'MailchimpMarketing/api_error'
16
16
  require 'MailchimpMarketing/version'
17
17
 
18
-
19
18
  # APIs
20
19
  require 'MailchimpMarketing/api/activity_feed_api'
21
20
  require 'MailchimpMarketing/api/authorized_apps_api'
@@ -46,8 +45,8 @@ require 'MailchimpMarketing/api/verified_domains_api'
46
45
 
47
46
  module MailchimpMarketing
48
47
  class Client
49
- def initialize(api_key = '', server = '')
50
- @api_client = ApiClient.new(api_key, server)
48
+ def initialize(config = {})
49
+ @api_client = ApiClient.new(config)
51
50
 
52
51
  @ActivityFeed = ActivityFeedApi.new(@api_client)
53
52
  @AuthorizedApps = AuthorizedAppsApi.new(@api_client)
@@ -77,8 +76,8 @@ module MailchimpMarketing
77
76
  @VerifiedDomains = VerifiedDomainsApi.new(@api_client)
78
77
  end
79
78
 
80
- def set_config(api_key = '', server = '')
81
- @api_client.set_config(api_key, server)
79
+ def set_config(config = {})
80
+ @api_client.set_config(config)
82
81
  end
83
82
 
84
83
  def activityFeed
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.1
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class ActivityFeedApi
@@ -19,94 +20,37 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # Get information about the activity feed endpoint's resources
23
- # Get information about the activity feed endpoint's resources.
24
- # @param [Hash] opts the optional parameters
25
- # @return [ActivityFeedRoot]
26
- def get(opts = {})
27
- data, _status_code, _headers = get_with_http_info(opts)
28
- data
29
- end
30
23
 
31
- # Get information about the activity feed endpoint&#39;s resources
32
- # Get information about the activity feed endpoint&#39;s resources.
33
- # @param [Hash] opts the optional parameters
34
- # @return [Array<(ActivityFeedRoot, Fixnum, Hash)>] ActivityFeedRoot data, response status code and response headers
35
- def get_with_http_info(opts = {})
36
- # resource path
37
- local_var_path = '/activity-feed'
24
+ # List activity feed resources
25
+ def get(opts = {})
38
26
 
39
- # query parameters
40
27
  query_params = {}
41
-
42
- # header parameters
43
- header_params = {}
44
- # HTTP header 'Accept' (if needed)
45
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
46
- # HTTP header 'Content-Type'
47
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
48
-
49
- # form parameters
50
28
  form_params = {}
51
-
52
- # http body (model)
53
29
  post_body = nil
54
- auth_names = ['basicAuth']
30
+
31
+ local_var_path = '/activity-feed'
55
32
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
56
- :header_params => header_params,
57
33
  :query_params => query_params,
58
34
  :form_params => form_params,
59
- :body => post_body,
60
- :auth_names => auth_names,
61
- :return_type => 'ActivityFeedRoot')
35
+ :body => post_body)
62
36
  return data, status_code, headers
63
37
  end
64
- # Chimp Chatter activity
65
- # Return the Chimp Chatter for this account ordered by most recent
66
- # @param [Hash] opts the optional parameters
67
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
68
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
69
- # @return [InlineResponse200]
70
- def get_chimp_chatter(opts = {})
71
- data, _status_code, _headers = get_chimp_chatter_with_http_info(opts)
72
- data
73
- end
74
38
 
75
- # Chimp Chatter activity
76
- # Return the Chimp Chatter for this account ordered by most recent
77
- # @param [Hash] opts the optional parameters
78
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
79
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
80
- # @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers
81
- def get_chimp_chatter_with_http_info(opts = {})
82
- # resource path
83
- local_var_path = '/activity-feed/chimp-chatter'
39
+ # Get latest chimp chatter
40
+ def get_chimp_chatter(opts = {})
41
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
84
42
 
85
- # query parameters
86
43
  query_params = {}
87
44
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
88
45
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
89
-
90
- # header parameters
91
- header_params = {}
92
- # HTTP header 'Accept' (if needed)
93
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
94
- # HTTP header 'Content-Type'
95
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
96
-
97
- # form parameters
98
46
  form_params = {}
99
-
100
- # http body (model)
101
47
  post_body = nil
102
- auth_names = ['basicAuth']
48
+
49
+ local_var_path = '/activity-feed/chimp-chatter'
103
50
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
104
- :header_params => header_params,
105
51
  :query_params => query_params,
106
52
  :form_params => form_params,
107
- :body => post_body,
108
- :auth_names => auth_names,
109
- :return_type => 'InlineResponse200')
53
+ :body => post_body)
110
54
  return data, status_code, headers
111
55
  end
112
56
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.1
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  require 'uri'
14
+ require 'json'
14
15
 
15
16
  module MailchimpMarketing
16
17
  class AuthorizedAppsApi
@@ -19,152 +20,58 @@ module MailchimpMarketing
19
20
  def initialize(api_client)
20
21
  @api_client = api_client
21
22
  end
22
- # Get a list of authorized apps
23
- # Get a list of an account's registered, connected applications.
24
- # @param [Hash] opts the optional parameters
25
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
26
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
27
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
28
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
29
- # @return [InlineResponse2001]
30
- def list(opts = {})
31
- data, _status_code, _headers = list_with_http_info(opts)
32
- data
33
- end
34
23
 
35
- # Get a list of authorized apps
36
- # Get a list of an account&#39;s registered, connected applications.
37
- # @param [Hash] opts the optional parameters
38
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
39
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
40
- # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
41
- # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
42
- # @return [Array<(InlineResponse2001, Fixnum, Hash)>] InlineResponse2001 data, response status code and response headers
43
- def list_with_http_info(opts = {})
44
- # resource path
45
- local_var_path = '/authorized-apps'
24
+ # List authorized apps
25
+ def list(opts = {})
26
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
46
27
 
47
- # query parameters
48
28
  query_params = {}
49
29
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
50
30
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
51
31
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
52
32
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
53
-
54
- # header parameters
55
- header_params = {}
56
- # HTTP header 'Accept' (if needed)
57
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
58
- # HTTP header 'Content-Type'
59
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
60
-
61
- # form parameters
62
33
  form_params = {}
63
-
64
- # http body (model)
65
34
  post_body = nil
66
- auth_names = ['basicAuth']
35
+
36
+ local_var_path = '/authorized-apps'
67
37
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
68
- :header_params => header_params,
69
38
  :query_params => query_params,
70
39
  :form_params => form_params,
71
- :body => post_body,
72
- :auth_names => auth_names,
73
- :return_type => 'InlineResponse2001')
40
+ :body => post_body)
74
41
  return data, status_code, headers
75
42
  end
76
- # Get information about a specific authorized app
77
- # Get information about a specific authorized application.
78
- # @param app_id The unique id for the connected authorized application.
79
- # @param [Hash] opts the optional parameters
80
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
81
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
82
- # @return [InlineResponse2001Apps]
83
- def get(app_id = {}, opts = {})
84
- data, _status_code, _headers = get_with_http_info(app_id, opts)
85
- data
86
- end
87
43
 
88
- # Get information about a specific authorized app
89
- # Get information about a specific authorized application.
90
- # @param app_id The unique id for the connected authorized application.
91
- # @param [Hash] opts the optional parameters
92
- # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
93
- # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
94
- # @return [Array<(InlineResponse2001Apps, Fixnum, Hash)>] InlineResponse2001Apps data, response status code and response headers
95
- def get_with_http_info(app_id, opts = {})
96
- # resource path
97
- local_var_path = '/authorized-apps/{app_id}'.sub('{' + 'app_id' + '}', app_id.to_s)
44
+ # Get authorized app info
45
+ def get(app_id, opts = {})
46
+ fail ArgumentError, "Missing required param: 'app_id'" if app_id.nil?
98
47
 
99
- # query parameters
100
48
  query_params = {}
101
49
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
102
50
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
103
-
104
- # header parameters
105
- header_params = {}
106
- # HTTP header 'Accept' (if needed)
107
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
108
- # HTTP header 'Content-Type'
109
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
110
-
111
- # form parameters
112
51
  form_params = {}
113
-
114
- # http body (model)
115
52
  post_body = nil
116
- auth_names = ['basicAuth']
53
+
54
+ local_var_path = '/authorized-apps/{app_id}'.sub('{' + 'app_id' + '}', app_id.to_s)
117
55
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
118
- :header_params => header_params,
119
56
  :query_params => query_params,
120
57
  :form_params => form_params,
121
- :body => post_body,
122
- :auth_names => auth_names,
123
- :return_type => 'InlineResponse2001Apps')
58
+ :body => post_body)
124
59
  return data, status_code, headers
125
60
  end
126
- # Link your application
127
- # Retrieve OAuth2-based credentials to associate API calls with your application.
128
- # @param client_details Use this endpoint to link your application and retrieve OAuth2-based credentials. This is useful if you can&#39;t implement the OAuth2 flow but still want to associate calls with your application.
129
- # @param [Hash] opts the optional parameters
130
- # @return [InlineResponse2002]
131
- def link(client_details = {}, opts = {})
132
- data, _status_code, _headers = link_with_http_info(client_details, opts)
133
- data
134
- end
135
61
 
136
- # Link your application
137
- # Retrieve OAuth2-based credentials to associate API calls with your application.
138
- # @param client_details Use this endpoint to link your application and retrieve OAuth2-based credentials. This is useful if you can&#39;t implement the OAuth2 flow but still want to associate calls with your application.
139
- # @param [Hash] opts the optional parameters
140
- # @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers
141
- def link_with_http_info(client_details, opts = {})
142
- # resource path
143
- local_var_path = '/authorized-apps'
62
+ # Link application
63
+ def link(client_details, opts = {})
64
+ fail ArgumentError, "Missing required param: 'client_details'" if client_details.nil?
144
65
 
145
- # query parameters
146
66
  query_params = {}
147
-
148
- # header parameters
149
- header_params = {}
150
- # HTTP header 'Accept' (if needed)
151
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
152
- # HTTP header 'Content-Type'
153
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
154
-
155
- # form parameters
156
67
  form_params = {}
157
-
158
- # http body (model)
159
68
  post_body = @api_client.object_to_http_body(client_details)
160
- auth_names = ['basicAuth']
69
+
70
+ local_var_path = '/authorized-apps'
161
71
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
162
- :header_params => header_params,
163
72
  :query_params => query_params,
164
73
  :form_params => form_params,
165
- :body => post_body,
166
- :auth_names => auth_names,
167
- :return_type => 'InlineResponse2002')
74
+ :body => post_body)
168
75
  return data, status_code, headers
169
76
  end
170
77
  end