MailchimpMarketing 3.0.2 → 3.0.9

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 +2 -2
  4. data/README.md +55 -46
  5. data/lib/MailchimpMarketing.rb +5 -6
  6. data/lib/MailchimpMarketing/api/activity_feed_api.rb +12 -73
  7. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +19 -119
  8. data/lib/MailchimpMarketing/api/automations_api.rb +129 -723
  9. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +32 -192
  10. data/lib/MailchimpMarketing/api/batches_api.rb +25 -154
  11. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +32 -192
  12. data/lib/MailchimpMarketing/api/campaigns_api.rb +143 -847
  13. data/lib/MailchimpMarketing/api/connected_sites_api.rb +31 -189
  14. data/lib/MailchimpMarketing/api/conversations_api.rb +35 -215
  15. data/lib/MailchimpMarketing/api/dashboard_api.rb +31 -233
  16. data/lib/MailchimpMarketing/api/ecommerce_api.rb +446 -2430
  17. data/lib/MailchimpMarketing/api/external_auths_api.rb +19 -119
  18. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +15 -87
  19. data/lib/MailchimpMarketing/api/file_manager_api.rb +70 -435
  20. data/lib/MailchimpMarketing/api/landing_pages_api.rb +50 -302
  21. data/lib/MailchimpMarketing/api/lists_api.rb +746 -3034
  22. data/lib/MailchimpMarketing/api/ping_api.rb +6 -35
  23. data/lib/MailchimpMarketing/api/postcards_api.rb +8 -43
  24. data/lib/MailchimpMarketing/api/reporting_api.rb +40 -249
  25. data/lib/MailchimpMarketing/api/reports_api.rb +152 -947
  26. data/lib/MailchimpMarketing/api/root_api.rb +6 -39
  27. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +7 -41
  28. data/lib/MailchimpMarketing/api/search_members_api.rb +7 -43
  29. data/lib/MailchimpMarketing/api/template_folders_api.rb +32 -192
  30. data/lib/MailchimpMarketing/api/templates_api.rb +39 -246
  31. data/lib/MailchimpMarketing/api/verified_domains_api.rb +31 -180
  32. data/lib/MailchimpMarketing/api_client.rb +34 -157
  33. data/lib/MailchimpMarketing/api_error.rb +1 -1
  34. data/lib/MailchimpMarketing/configuration.rb +1 -1
  35. data/lib/MailchimpMarketing/version.rb +2 -2
  36. metadata +5 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4386b4522fc6e07c725cf36df587059791ef8f2001ec0866792d8781552ab817
4
- data.tar.gz: 20bd69131ba866959d87b3771cc3a89db1ffa422c9bb8ba896e6b1e5caa0cbdb
3
+ metadata.gz: 1fa0c5a22cb183467a5e02936e9e4a31ce2cc64f0c0c06d1003d63f5253065b7
4
+ data.tar.gz: 0301af633c2dc7daafb5820c27d69ee0286fdef88c02c8a907862cbb096da2a9
5
5
  SHA512:
6
- metadata.gz: becf448023ac1849b55ced81716ddbeeb7b0dc9c7dbe70f4796dd1e74a9599c8425b526e5623b386b822de4b27140e9dc05cb2c3c9a57403ff5633df75018208
7
- data.tar.gz: d8256f767a149577aac0f450a375a2b03225e67a6e34c31b1b8035c39d0de55f59ab5fc005566e7e2486c9baea8005afe148994ea8782344071fef91649f2130
6
+ metadata.gz: 9a9507c87aa9bd57c593fbd3b5abfd23898a1b96154667b38cce1e71b18e50652828a0c93adea39010969e14bcfdd5f8685442190465103e1e70728c08688a89
7
+ data.tar.gz: 82ae5ceef2516d0a2047c2d9744d17d3f7406989ffdbc42db8af69fe02b3029551e5681054f5b91f64923e06de640ee401ac152a9f8a5141d7863de770a3fe7c
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.2
8
+ OpenAPI spec version: 3.0.9
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
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.license = 'Apache-2.0'
28
28
  s.required_ruby_version = ">= 1.9"
29
29
 
30
- s.add_runtime_dependency 'faraday', '~> 1.0', '>= 1.0.1'
30
+ s.add_runtime_dependency 'excon', '~> 0.76.0'
31
31
  s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
32
 
33
33
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
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.2.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.2.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.2'
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.9.gem
24
+ gem 'MailchimpMarketing', '~> 3.0.9'
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.2
6
+ OpenAPI spec version: 3.0.9
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.2
6
+ OpenAPI spec version: 3.0.9
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
@@ -19,94 +19,33 @@ module MailchimpMarketing
19
19
  def initialize(api_client)
20
20
  @api_client = api_client
21
21
  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
22
 
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'
23
+ # List activity feed resources
24
+ def get(opts = {})
38
25
 
39
- # query parameters
40
26
  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
- form_params = {}
51
-
52
- # http body (model)
53
27
  post_body = nil
54
- auth_names = ['basicAuth']
28
+
29
+ local_var_path = '/activity-feed'
55
30
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
56
- :header_params => header_params,
57
31
  :query_params => query_params,
58
- :form_params => form_params,
59
- :body => post_body,
60
- :auth_names => auth_names,
61
- :return_type => 'ActivityFeedRoot')
32
+ :body => post_body)
62
33
  return data, status_code, headers
63
34
  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
35
 
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'
36
+ # Get latest chimp chatter
37
+ def get_chimp_chatter(opts = {})
38
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
84
39
 
85
- # query parameters
86
40
  query_params = {}
87
41
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
88
42
  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
- form_params = {}
99
-
100
- # http body (model)
101
43
  post_body = nil
102
- auth_names = ['basicAuth']
44
+
45
+ local_var_path = '/activity-feed/chimp-chatter'
103
46
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
104
- :header_params => header_params,
105
47
  :query_params => query_params,
106
- :form_params => form_params,
107
- :body => post_body,
108
- :auth_names => auth_names,
109
- :return_type => 'InlineResponse200')
48
+ :body => post_body)
110
49
  return data, status_code, headers
111
50
  end
112
51
  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.2
6
+ OpenAPI spec version: 3.0.9
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
@@ -19,152 +19,52 @@ module MailchimpMarketing
19
19
  def initialize(api_client)
20
20
  @api_client = api_client
21
21
  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
22
 
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'
23
+ # List authorized apps
24
+ def list(opts = {})
25
+ fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
46
26
 
47
- # query parameters
48
27
  query_params = {}
49
28
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
50
29
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
51
30
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
52
31
  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
- form_params = {}
63
-
64
- # http body (model)
65
32
  post_body = nil
66
- auth_names = ['basicAuth']
33
+
34
+ local_var_path = '/authorized-apps'
67
35
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
68
- :header_params => header_params,
69
36
  :query_params => query_params,
70
- :form_params => form_params,
71
- :body => post_body,
72
- :auth_names => auth_names,
73
- :return_type => 'InlineResponse2001')
37
+ :body => post_body)
74
38
  return data, status_code, headers
75
39
  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
40
 
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)
41
+ # Get authorized app info
42
+ def get(app_id, opts = {})
43
+ fail ArgumentError, "Missing required param: 'app_id'" if app_id.nil?
98
44
 
99
- # query parameters
100
45
  query_params = {}
101
46
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
102
47
  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
- form_params = {}
113
-
114
- # http body (model)
115
48
  post_body = nil
116
- auth_names = ['basicAuth']
49
+
50
+ local_var_path = '/authorized-apps/{app_id}'.sub('{' + 'app_id' + '}', app_id.to_s)
117
51
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
118
- :header_params => header_params,
119
52
  :query_params => query_params,
120
- :form_params => form_params,
121
- :body => post_body,
122
- :auth_names => auth_names,
123
- :return_type => 'InlineResponse2001Apps')
53
+ :body => post_body)
124
54
  return data, status_code, headers
125
55
  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
56
 
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'
57
+ # Link application
58
+ def link(client_details, opts = {})
59
+ fail ArgumentError, "Missing required param: 'client_details'" if client_details.nil?
144
60
 
145
- # query parameters
146
61
  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
- form_params = {}
157
-
158
- # http body (model)
159
62
  post_body = @api_client.object_to_http_body(client_details)
160
- auth_names = ['basicAuth']
63
+
64
+ local_var_path = '/authorized-apps'
161
65
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
162
- :header_params => header_params,
163
66
  :query_params => query_params,
164
- :form_params => form_params,
165
- :body => post_body,
166
- :auth_names => auth_names,
167
- :return_type => 'InlineResponse2002')
67
+ :body => post_body)
168
68
  return data, status_code, headers
169
69
  end
170
70
  end