late-sdk 0.0.1155 → 0.0.1156

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: badfd602e905777552f7f03bdc0b359aef87c6b2a55451a45bfcaf2817e940d4
4
- data.tar.gz: f0aaec40bf880d6a7b4550b8ad4bf3cc9169f5797d692138209acb47eebbc043
3
+ metadata.gz: 67a5e3c5a5de07e9a9929e881e0c5a76149aa19aa93e610a059abd8fbf79ba49
4
+ data.tar.gz: 9ffc972b9292b62288dbbf7256826907cbc51eda7172ee3d7b31feb570481814
5
5
  SHA512:
6
- metadata.gz: e0295ea2cc2206af72786e6dabd8e45515a7285bcb0a7ff3d2fd51ab59a3b8b6e80a4fc02c40164d770315f56b9caf8f50e6b58a7e20b01442c6204387c720fd
7
- data.tar.gz: ef65b43ce850dbe8073d2fa17c94721be7af269493cd2faccc8b18acf4d21c027027ada4b0a23d88c1388e5136630770123ef629276a405fd2de803ec7eee438
6
+ metadata.gz: 5fc982164b5e11b575effd1d4ac900e4d4973c1ff36ffbd8eb866421d71f415af58fc71c1c2839706ede7827fb8c8e8607944be664489390fa86320c549df3cc
7
+ data.tar.gz: 0140b83177c54c2efb319b294704e7c16540ebb30a3bdca87c482022a9e2ed432ca6c3ef472e3c05f582689ddd70e9c03446a21c76441954b0b419980141153a
data/README.md CHANGED
@@ -2012,6 +2012,8 @@ Class | Method | HTTP request | Description
2012
2012
  - [Zernio::GoogleRsaHeadline](docs/GoogleRsaHeadline.md)
2013
2013
  - [Zernio::GoogleSitelink](docs/GoogleSitelink.md)
2014
2014
  - [Zernio::GoogleStructuredSnippet](docs/GoogleStructuredSnippet.md)
2015
+ - [Zernio::GrantBusinessPartner200Response](docs/GrantBusinessPartner200Response.md)
2016
+ - [Zernio::GrantBusinessPartner200ResponsePartner](docs/GrantBusinessPartner200ResponsePartner.md)
2015
2017
  - [Zernio::GrantBusinessPartner201Response](docs/GrantBusinessPartner201Response.md)
2016
2018
  - [Zernio::GrantBusinessPartner201ResponsePartner](docs/GrantBusinessPartner201ResponsePartner.md)
2017
2019
  - [Zernio::GrantBusinessPartnerRequest](docs/GrantBusinessPartnerRequest.md)
data/docs/AccountsApi.md CHANGED
@@ -674,11 +674,11 @@ end
674
674
 
675
675
  ## grant_business_partner
676
676
 
677
- > <GrantBusinessPartner201Response> grant_business_partner(account_id, grant_business_partner_request)
677
+ > <GrantBusinessPartner200Response> grant_business_partner(account_id, grant_business_partner_request)
678
678
 
679
679
  Share the Page with a partner business
680
680
 
681
- Grants a partner business portfolio tasks on the Facebook Page behind this account. With `ADVERTISE`, the partner can run ads for the Page from ad accounts in its own portfolio, which is how an integrator advertises for an end user without touching the end user's ad accounts. Meta only lets a user token share a Page that a business portfolio owns. A Page outside any portfolio must first be claimed into one at business.facebook.com; this endpoint answers `422` until that is done. Granting to a portfolio that already has access replaces its task set, so the call is safe to repeat. After the grant, the partner assigns its own people to the Page with `POST /v1/ads/page-users`; Meta does not assign partner admins automatically. The Instagram professional account linked to the Page is returned in `page` so the partner can reference it; Meta exposes no API to share Instagram accounts, that is done in Business Settings.
681
+ Grants a partner business portfolio tasks on the Facebook Page behind this account. With `ADVERTISE`, the partner can run ads for the Page from ad accounts in its own portfolio, which is how an integrator advertises for an end user without touching the end user's ad accounts. Meta only lets a user token share a Page that a business portfolio owns. A Page outside any portfolio must first be claimed into one at business.facebook.com; this endpoint answers `422` until that is done. Meta refuses a second grant to a portfolio that already has access instead of replacing its tasks, so that case answers `200` with `alreadyShared: true` and the tasks the partner currently holds. To change a partner's tasks, revoke and grant again. After the grant, the partner assigns its own people to the Page with `POST /v1/ads/page-users`; Meta does not assign partner admins automatically. The Instagram professional account linked to the Page is returned in `page` so the partner can reference it; Meta exposes no API to share Instagram accounts, that is done in Business Settings.
682
682
 
683
683
  ### Examples
684
684
 
@@ -708,7 +708,7 @@ end
708
708
 
709
709
  This returns an Array which contains the response data, status code and headers.
710
710
 
711
- > <Array(<GrantBusinessPartner201Response>, Integer, Hash)> grant_business_partner_with_http_info(account_id, grant_business_partner_request)
711
+ > <Array(<GrantBusinessPartner200Response>, Integer, Hash)> grant_business_partner_with_http_info(account_id, grant_business_partner_request)
712
712
 
713
713
  ```ruby
714
714
  begin
@@ -716,7 +716,7 @@ begin
716
716
  data, status_code, headers = api_instance.grant_business_partner_with_http_info(account_id, grant_business_partner_request)
717
717
  p status_code # => 2xx
718
718
  p headers # => { ... }
719
- p data # => <GrantBusinessPartner201Response>
719
+ p data # => <GrantBusinessPartner200Response>
720
720
  rescue Zernio::ApiError => e
721
721
  puts "Error when calling AccountsApi->grant_business_partner_with_http_info: #{e}"
722
722
  end
@@ -731,7 +731,7 @@ end
731
731
 
732
732
  ### Return type
733
733
 
734
- [**GrantBusinessPartner201Response**](GrantBusinessPartner201Response.md)
734
+ [**GrantBusinessPartner200Response**](GrantBusinessPartner200Response.md)
735
735
 
736
736
  ### Authorization
737
737
 
@@ -0,0 +1,22 @@
1
+ # Zernio::GrantBusinessPartner200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **page** | [**MetaPageOwnership**](MetaPageOwnership.md) | | [optional] |
8
+ | **partner** | [**GrantBusinessPartner200ResponsePartner**](GrantBusinessPartner200ResponsePartner.md) | | [optional] |
9
+ | **already_shared** | **Boolean** | Always true on this response. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::GrantBusinessPartner200Response.new(
17
+ page: null,
18
+ partner: null,
19
+ already_shared: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # Zernio::GrantBusinessPartner200ResponsePartner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **business_id** | **String** | | [optional] |
8
+ | **permitted_tasks** | **Array&lt;String&gt;** | Tasks the partner currently holds. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::GrantBusinessPartner200ResponsePartner.new(
16
+ business_id: null,
17
+ permitted_tasks: null
18
+ )
19
+ ```
20
+
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **business_id** | **String** | | [optional] |
8
8
  | **name** | **String** | | [optional] |
9
- | **permitted_tasks** | **Array&lt;String&gt;** | | [optional] |
9
+ | **permitted_tasks** | **Array&lt;String&gt;** | Tasks the partner holds, in the bare spelling the grant takes (ADVERTISE, ANALYZE, MANAGE, ...). Meta reads them back with a PROFILE_PLUS_ prefix, which is stripped here; partners granted in Business Settings may hold tasks beyond the six the grant accepts, such as MANAGE_LEADS or REVENUE. | [optional] |
10
10
 
11
11
  ## Example
12
12
 
@@ -627,22 +627,22 @@ module Zernio
627
627
  end
628
628
 
629
629
  # Share the Page with a partner business
630
- # Grants a partner business portfolio tasks on the Facebook Page behind this account. With `ADVERTISE`, the partner can run ads for the Page from ad accounts in its own portfolio, which is how an integrator advertises for an end user without touching the end user's ad accounts. Meta only lets a user token share a Page that a business portfolio owns. A Page outside any portfolio must first be claimed into one at business.facebook.com; this endpoint answers `422` until that is done. Granting to a portfolio that already has access replaces its task set, so the call is safe to repeat. After the grant, the partner assigns its own people to the Page with `POST /v1/ads/page-users`; Meta does not assign partner admins automatically. The Instagram professional account linked to the Page is returned in `page` so the partner can reference it; Meta exposes no API to share Instagram accounts, that is done in Business Settings.
630
+ # Grants a partner business portfolio tasks on the Facebook Page behind this account. With `ADVERTISE`, the partner can run ads for the Page from ad accounts in its own portfolio, which is how an integrator advertises for an end user without touching the end user's ad accounts. Meta only lets a user token share a Page that a business portfolio owns. A Page outside any portfolio must first be claimed into one at business.facebook.com; this endpoint answers `422` until that is done. Meta refuses a second grant to a portfolio that already has access instead of replacing its tasks, so that case answers `200` with `alreadyShared: true` and the tasks the partner currently holds. To change a partner's tasks, revoke and grant again. After the grant, the partner assigns its own people to the Page with `POST /v1/ads/page-users`; Meta does not assign partner admins automatically. The Instagram professional account linked to the Page is returned in `page` so the partner can reference it; Meta exposes no API to share Instagram accounts, that is done in Business Settings.
631
631
  # @param account_id [String] Zernio SocialAccount id of the Facebook or Instagram account.
632
632
  # @param grant_business_partner_request [GrantBusinessPartnerRequest]
633
633
  # @param [Hash] opts the optional parameters
634
- # @return [GrantBusinessPartner201Response]
634
+ # @return [GrantBusinessPartner200Response]
635
635
  def grant_business_partner(account_id, grant_business_partner_request, opts = {})
636
636
  data, _status_code, _headers = grant_business_partner_with_http_info(account_id, grant_business_partner_request, opts)
637
637
  data
638
638
  end
639
639
 
640
640
  # Share the Page with a partner business
641
- # Grants a partner business portfolio tasks on the Facebook Page behind this account. With &#x60;ADVERTISE&#x60;, the partner can run ads for the Page from ad accounts in its own portfolio, which is how an integrator advertises for an end user without touching the end user&#39;s ad accounts. Meta only lets a user token share a Page that a business portfolio owns. A Page outside any portfolio must first be claimed into one at business.facebook.com; this endpoint answers &#x60;422&#x60; until that is done. Granting to a portfolio that already has access replaces its task set, so the call is safe to repeat. After the grant, the partner assigns its own people to the Page with &#x60;POST /v1/ads/page-users&#x60;; Meta does not assign partner admins automatically. The Instagram professional account linked to the Page is returned in &#x60;page&#x60; so the partner can reference it; Meta exposes no API to share Instagram accounts, that is done in Business Settings.
641
+ # Grants a partner business portfolio tasks on the Facebook Page behind this account. With &#x60;ADVERTISE&#x60;, the partner can run ads for the Page from ad accounts in its own portfolio, which is how an integrator advertises for an end user without touching the end user&#39;s ad accounts. Meta only lets a user token share a Page that a business portfolio owns. A Page outside any portfolio must first be claimed into one at business.facebook.com; this endpoint answers &#x60;422&#x60; until that is done. Meta refuses a second grant to a portfolio that already has access instead of replacing its tasks, so that case answers &#x60;200&#x60; with &#x60;alreadyShared: true&#x60; and the tasks the partner currently holds. To change a partner&#39;s tasks, revoke and grant again. After the grant, the partner assigns its own people to the Page with &#x60;POST /v1/ads/page-users&#x60;; Meta does not assign partner admins automatically. The Instagram professional account linked to the Page is returned in &#x60;page&#x60; so the partner can reference it; Meta exposes no API to share Instagram accounts, that is done in Business Settings.
642
642
  # @param account_id [String] Zernio SocialAccount id of the Facebook or Instagram account.
643
643
  # @param grant_business_partner_request [GrantBusinessPartnerRequest]
644
644
  # @param [Hash] opts the optional parameters
645
- # @return [Array<(GrantBusinessPartner201Response, Integer, Hash)>] GrantBusinessPartner201Response data, response status code and response headers
645
+ # @return [Array<(GrantBusinessPartner200Response, Integer, Hash)>] GrantBusinessPartner200Response data, response status code and response headers
646
646
  def grant_business_partner_with_http_info(account_id, grant_business_partner_request, opts = {})
647
647
  if @api_client.config.debugging
648
648
  @api_client.config.logger.debug 'Calling API: AccountsApi.grant_business_partner ...'
@@ -678,7 +678,7 @@ module Zernio
678
678
  post_body = opts[:debug_body] || @api_client.object_to_http_body(grant_business_partner_request)
679
679
 
680
680
  # return_type
681
- return_type = opts[:debug_return_type] || 'GrantBusinessPartner201Response'
681
+ return_type = opts[:debug_return_type] || 'GrantBusinessPartner200Response'
682
682
 
683
683
  # auth_names
684
684
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
5
+
6
+ The version of the OpenAPI document: 1.129.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GrantBusinessPartner200Response < ApiModelBase
18
+ attr_accessor :page
19
+
20
+ attr_accessor :partner
21
+
22
+ # Always true on this response.
23
+ attr_accessor :already_shared
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'page' => :'page',
29
+ :'partner' => :'partner',
30
+ :'already_shared' => :'alreadyShared'
31
+ }
32
+ end
33
+
34
+ # Returns attribute mapping this model knows about
35
+ def self.acceptable_attribute_map
36
+ attribute_map
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ acceptable_attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'page' => :'MetaPageOwnership',
48
+ :'partner' => :'GrantBusinessPartner200ResponsePartner',
49
+ :'already_shared' => :'Boolean'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GrantBusinessPartner200Response` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ acceptable_attribute_map = self.class.acceptable_attribute_map
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!acceptable_attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GrantBusinessPartner200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'page')
76
+ self.page = attributes[:'page']
77
+ end
78
+
79
+ if attributes.key?(:'partner')
80
+ self.partner = attributes[:'partner']
81
+ end
82
+
83
+ if attributes.key?(:'already_shared')
84
+ self.already_shared = attributes[:'already_shared']
85
+ end
86
+ end
87
+
88
+ # Show invalid properties with the reasons. Usually used together with valid?
89
+ # @return Array for valid properties with the reasons
90
+ def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
92
+ invalid_properties = Array.new
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
+ true
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ page == o.page &&
109
+ partner == o.partner &&
110
+ already_shared == o.already_shared
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [page, partner, already_shared].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Returns the object in the form of hash
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_hash
151
+ hash = {}
152
+ self.class.attribute_map.each_pair do |attr, param|
153
+ value = self.send(attr)
154
+ if value.nil?
155
+ is_nullable = self.class.openapi_nullable.include?(attr)
156
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
+ end
158
+
159
+ hash[param] = _to_hash(value)
160
+ end
161
+ hash
162
+ end
163
+
164
+ end
165
+
166
+ end
@@ -0,0 +1,159 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
5
+
6
+ The version of the OpenAPI document: 1.129.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GrantBusinessPartner200ResponsePartner < ApiModelBase
18
+ attr_accessor :business_id
19
+
20
+ # Tasks the partner currently holds.
21
+ attr_accessor :permitted_tasks
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'business_id' => :'businessId',
27
+ :'permitted_tasks' => :'permittedTasks'
28
+ }
29
+ end
30
+
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ acceptable_attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'business_id' => :'String',
45
+ :'permitted_tasks' => :'Array<String>'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GrantBusinessPartner200ResponsePartner` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GrantBusinessPartner200ResponsePartner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'business_id')
72
+ self.business_id = attributes[:'business_id']
73
+ end
74
+
75
+ if attributes.key?(:'permitted_tasks')
76
+ if (value = attributes[:'permitted_tasks']).is_a?(Array)
77
+ self.permitted_tasks = value
78
+ end
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ business_id == o.business_id &&
103
+ permitted_tasks == o.permitted_tasks
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [business_id, permitted_tasks].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ transformed_hash = {}
125
+ openapi_types.each_pair do |key, type|
126
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = nil
128
+ elsif type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[attribute_map[key]].is_a?(Array)
132
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
+ end
134
+ elsif !attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
+ end
137
+ end
138
+ new(transformed_hash)
139
+ end
140
+
141
+ # Returns the object in the form of hash
142
+ # @return [Hash] Returns the object in the form of hash
143
+ def to_hash
144
+ hash = {}
145
+ self.class.attribute_map.each_pair do |attr, param|
146
+ value = self.send(attr)
147
+ if value.nil?
148
+ is_nullable = self.class.openapi_nullable.include?(attr)
149
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
150
+ end
151
+
152
+ hash[param] = _to_hash(value)
153
+ end
154
+ hash
155
+ end
156
+
157
+ end
158
+
159
+ end
@@ -19,6 +19,7 @@ module Zernio
19
19
 
20
20
  attr_accessor :name
21
21
 
22
+ # Tasks the partner holds, in the bare spelling the grant takes (ADVERTISE, ANALYZE, MANAGE, ...). Meta reads them back with a PROFILE_PLUS_ prefix, which is stripped here; partners granted in Business Settings may hold tasks beyond the six the grant accepts, such as MANAGE_LEADS or REVENUE.
22
23
  attr_accessor :permitted_tasks
23
24
 
24
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.1155'
14
+ VERSION = '0.0.1156'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -1112,6 +1112,8 @@ require 'zernio-sdk/models/google_rsa_description'
1112
1112
  require 'zernio-sdk/models/google_rsa_headline'
1113
1113
  require 'zernio-sdk/models/google_sitelink'
1114
1114
  require 'zernio-sdk/models/google_structured_snippet'
1115
+ require 'zernio-sdk/models/grant_business_partner200_response'
1116
+ require 'zernio-sdk/models/grant_business_partner200_response_partner'
1115
1117
  require 'zernio-sdk/models/grant_business_partner201_response'
1116
1118
  require 'zernio-sdk/models/grant_business_partner201_response_partner'
1117
1119
  require 'zernio-sdk/models/grant_business_partner_request'