growwer 1.0.2 → 1.1.0
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 +4 -4
- data/README.md +10 -5
- data/docs/CatalogueApi.md +4 -4
- data/docs/CreateSellerMediaRequest.md +38 -0
- data/docs/CreateSellerMediaRequestPostOffer.md +24 -0
- data/docs/ManagedServicesApi.md +2 -2
- data/docs/ProjectCatalogueMediaAllOfProject.md +3 -1
- data/docs/ProjectCatalogueMediaAllOfProjectAiKeywords.md +20 -0
- data/docs/SellerMedia.md +2 -0
- data/docs/SellerMediaPostOffer.md +7 -1
- data/docs/SellerMediasApi.md +148 -5
- data/docs/UpdateSellerMediaRequest.md +2 -0
- data/docs/UpdateSellerMediaRequestPostOffer.md +8 -2
- data/lib/growwer/api/catalogue_api.rb +4 -4
- data/lib/growwer/api/managed_services_api.rb +4 -4
- data/lib/growwer/api/seller_medias_api.rb +157 -4
- data/lib/growwer/api_client.rb +1 -1
- data/lib/growwer/models/create_seller_media_request.rb +447 -0
- data/lib/growwer/models/create_seller_media_request_post_offer.rb +273 -0
- data/lib/growwer/models/project_catalogue_media_all_of_project.rb +34 -5
- data/lib/growwer/models/project_catalogue_media_all_of_project_ai_keywords.rb +211 -0
- data/lib/growwer/models/seller_media.rb +29 -1
- data/lib/growwer/models/seller_media_post_offer.rb +99 -1
- data/lib/growwer/models/update_seller_media_request.rb +44 -1
- data/lib/growwer/models/update_seller_media_request_post_offer.rb +96 -12
- data/lib/growwer/version.rb +1 -1
- data/lib/growwer.rb +3 -0
- data/spec/models/create_seller_media_request_post_offer_spec.rb +62 -0
- data/spec/models/create_seller_media_request_spec.rb +100 -0
- data/spec/models/project_catalogue_media_all_of_project_ai_keywords_spec.rb +46 -0
- metadata +14 -2
|
@@ -18,12 +18,47 @@ module Growwer
|
|
|
18
18
|
# One entry per link type you offer.
|
|
19
19
|
attr_accessor :pricing_options
|
|
20
20
|
|
|
21
|
+
# How many links a sponsored post may hold, 1 to 4.
|
|
22
|
+
attr_accessor :maximum_links
|
|
23
|
+
|
|
24
|
+
# Whether sponsored posts are labelled as advertising.
|
|
25
|
+
attr_accessor :advertising_labelling_policy
|
|
26
|
+
|
|
27
|
+
# The social networks sponsored posts are promoted on.
|
|
28
|
+
attr_accessor :promoted_social_networks
|
|
29
|
+
|
|
30
|
+
# Read here, but PATCH /seller/medias/{id} and POST /seller/medias take it at the top level of the body.
|
|
21
31
|
attr_accessor :extra_services
|
|
22
32
|
|
|
33
|
+
class EnumAttributeValidator
|
|
34
|
+
attr_reader :datatype
|
|
35
|
+
attr_reader :allowable_values
|
|
36
|
+
|
|
37
|
+
def initialize(datatype, allowable_values)
|
|
38
|
+
@allowable_values = allowable_values.map do |value|
|
|
39
|
+
case datatype.to_s
|
|
40
|
+
when /Integer/i
|
|
41
|
+
value.to_i
|
|
42
|
+
when /Float/i
|
|
43
|
+
value.to_f
|
|
44
|
+
else
|
|
45
|
+
value
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def valid?(value)
|
|
51
|
+
!value || allowable_values.include?(value)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
23
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
56
|
def self.attribute_map
|
|
25
57
|
{
|
|
26
58
|
:'pricing_options' => :'pricingOptions',
|
|
59
|
+
:'maximum_links' => :'maximumLinks',
|
|
60
|
+
:'advertising_labelling_policy' => :'advertisingLabellingPolicy',
|
|
61
|
+
:'promoted_social_networks' => :'promotedSocialNetworks',
|
|
27
62
|
:'extra_services' => :'extraServices'
|
|
28
63
|
}
|
|
29
64
|
end
|
|
@@ -42,6 +77,9 @@ module Growwer
|
|
|
42
77
|
def self.openapi_types
|
|
43
78
|
{
|
|
44
79
|
:'pricing_options' => :'Array<SellerMediaPostOfferPricingOptionsInner>',
|
|
80
|
+
:'maximum_links' => :'Integer',
|
|
81
|
+
:'advertising_labelling_policy' => :'String',
|
|
82
|
+
:'promoted_social_networks' => :'Array<String>',
|
|
45
83
|
:'extra_services' => :'Array<UpdateSellerMediaRequestExtraServicesInner>'
|
|
46
84
|
}
|
|
47
85
|
end
|
|
@@ -76,6 +114,26 @@ module Growwer
|
|
|
76
114
|
self.pricing_options = nil
|
|
77
115
|
end
|
|
78
116
|
|
|
117
|
+
if attributes.key?(:'maximum_links')
|
|
118
|
+
self.maximum_links = attributes[:'maximum_links']
|
|
119
|
+
else
|
|
120
|
+
self.maximum_links = nil
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'advertising_labelling_policy')
|
|
124
|
+
self.advertising_labelling_policy = attributes[:'advertising_labelling_policy']
|
|
125
|
+
else
|
|
126
|
+
self.advertising_labelling_policy = nil
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'promoted_social_networks')
|
|
130
|
+
if (value = attributes[:'promoted_social_networks']).is_a?(Array)
|
|
131
|
+
self.promoted_social_networks = value
|
|
132
|
+
end
|
|
133
|
+
else
|
|
134
|
+
self.promoted_social_networks = nil
|
|
135
|
+
end
|
|
136
|
+
|
|
79
137
|
if attributes.key?(:'extra_services')
|
|
80
138
|
if (value = attributes[:'extra_services']).is_a?(Array)
|
|
81
139
|
self.extra_services = value
|
|
@@ -94,6 +152,18 @@ module Growwer
|
|
|
94
152
|
invalid_properties.push('invalid value for "pricing_options", pricing_options cannot be nil.')
|
|
95
153
|
end
|
|
96
154
|
|
|
155
|
+
if @maximum_links.nil?
|
|
156
|
+
invalid_properties.push('invalid value for "maximum_links", maximum_links cannot be nil.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if @advertising_labelling_policy.nil?
|
|
160
|
+
invalid_properties.push('invalid value for "advertising_labelling_policy", advertising_labelling_policy cannot be nil.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if @promoted_social_networks.nil?
|
|
164
|
+
invalid_properties.push('invalid value for "promoted_social_networks", promoted_social_networks cannot be nil.')
|
|
165
|
+
end
|
|
166
|
+
|
|
97
167
|
if @extra_services.nil?
|
|
98
168
|
invalid_properties.push('invalid value for "extra_services", extra_services cannot be nil.')
|
|
99
169
|
end
|
|
@@ -106,6 +176,11 @@ module Growwer
|
|
|
106
176
|
def valid?
|
|
107
177
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
108
178
|
return false if @pricing_options.nil?
|
|
179
|
+
return false if @maximum_links.nil?
|
|
180
|
+
return false if @advertising_labelling_policy.nil?
|
|
181
|
+
advertising_labelling_policy_validator = EnumAttributeValidator.new('String', ["always", "never"])
|
|
182
|
+
return false unless advertising_labelling_policy_validator.valid?(@advertising_labelling_policy)
|
|
183
|
+
return false if @promoted_social_networks.nil?
|
|
109
184
|
return false if @extra_services.nil?
|
|
110
185
|
true
|
|
111
186
|
end
|
|
@@ -120,6 +195,26 @@ module Growwer
|
|
|
120
195
|
@pricing_options = pricing_options
|
|
121
196
|
end
|
|
122
197
|
|
|
198
|
+
# Custom attribute writer method with validation
|
|
199
|
+
# @param [Object] maximum_links Value to be assigned
|
|
200
|
+
def maximum_links=(maximum_links)
|
|
201
|
+
if maximum_links.nil?
|
|
202
|
+
fail ArgumentError, 'maximum_links cannot be nil'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
@maximum_links = maximum_links
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
209
|
+
# @param [Object] advertising_labelling_policy Object to be assigned
|
|
210
|
+
def advertising_labelling_policy=(advertising_labelling_policy)
|
|
211
|
+
validator = EnumAttributeValidator.new('String', ["always", "never"])
|
|
212
|
+
unless validator.valid?(advertising_labelling_policy)
|
|
213
|
+
fail ArgumentError, "invalid value for \"advertising_labelling_policy\", must be one of #{validator.allowable_values}."
|
|
214
|
+
end
|
|
215
|
+
@advertising_labelling_policy = advertising_labelling_policy
|
|
216
|
+
end
|
|
217
|
+
|
|
123
218
|
# Custom attribute writer method with validation
|
|
124
219
|
# @param [Object] extra_services Value to be assigned
|
|
125
220
|
def extra_services=(extra_services)
|
|
@@ -136,6 +231,9 @@ module Growwer
|
|
|
136
231
|
return true if self.equal?(o)
|
|
137
232
|
self.class == o.class &&
|
|
138
233
|
pricing_options == o.pricing_options &&
|
|
234
|
+
maximum_links == o.maximum_links &&
|
|
235
|
+
advertising_labelling_policy == o.advertising_labelling_policy &&
|
|
236
|
+
promoted_social_networks == o.promoted_social_networks &&
|
|
139
237
|
extra_services == o.extra_services
|
|
140
238
|
end
|
|
141
239
|
|
|
@@ -148,7 +246,7 @@ module Growwer
|
|
|
148
246
|
# Calculates hash code according to all attributes.
|
|
149
247
|
# @return [Integer] Hash code
|
|
150
248
|
def hash
|
|
151
|
-
[pricing_options, extra_services].hash
|
|
249
|
+
[pricing_options, maximum_links, advertising_labelling_policy, promoted_social_networks, extra_services].hash
|
|
152
250
|
end
|
|
153
251
|
|
|
154
252
|
# Builds the object from hash
|
|
@@ -15,15 +15,40 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Growwer
|
|
17
17
|
class UpdateSellerMediaRequest < ApiModelBase
|
|
18
|
+
attr_accessor :typology
|
|
19
|
+
|
|
18
20
|
attr_accessor :post_offer
|
|
19
21
|
|
|
20
22
|
attr_accessor :link_addition_offer
|
|
21
23
|
|
|
22
24
|
attr_accessor :extra_services
|
|
23
25
|
|
|
26
|
+
class EnumAttributeValidator
|
|
27
|
+
attr_reader :datatype
|
|
28
|
+
attr_reader :allowable_values
|
|
29
|
+
|
|
30
|
+
def initialize(datatype, allowable_values)
|
|
31
|
+
@allowable_values = allowable_values.map do |value|
|
|
32
|
+
case datatype.to_s
|
|
33
|
+
when /Integer/i
|
|
34
|
+
value.to_i
|
|
35
|
+
when /Float/i
|
|
36
|
+
value.to_f
|
|
37
|
+
else
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def valid?(value)
|
|
44
|
+
!value || allowable_values.include?(value)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
24
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
49
|
def self.attribute_map
|
|
26
50
|
{
|
|
51
|
+
:'typology' => :'typology',
|
|
27
52
|
:'post_offer' => :'postOffer',
|
|
28
53
|
:'link_addition_offer' => :'linkAdditionOffer',
|
|
29
54
|
:'extra_services' => :'extraServices'
|
|
@@ -43,6 +68,7 @@ module Growwer
|
|
|
43
68
|
# Attribute type mapping.
|
|
44
69
|
def self.openapi_types
|
|
45
70
|
{
|
|
71
|
+
:'typology' => :'String',
|
|
46
72
|
:'post_offer' => :'UpdateSellerMediaRequestPostOffer',
|
|
47
73
|
:'link_addition_offer' => :'UpdateSellerMediaRequestLinkAdditionOffer',
|
|
48
74
|
:'extra_services' => :'Array<UpdateSellerMediaRequestExtraServicesInner>'
|
|
@@ -72,6 +98,10 @@ module Growwer
|
|
|
72
98
|
h[k.to_sym] = v
|
|
73
99
|
}
|
|
74
100
|
|
|
101
|
+
if attributes.key?(:'typology')
|
|
102
|
+
self.typology = attributes[:'typology']
|
|
103
|
+
end
|
|
104
|
+
|
|
75
105
|
if attributes.key?(:'post_offer')
|
|
76
106
|
self.post_offer = attributes[:'post_offer']
|
|
77
107
|
end
|
|
@@ -99,14 +129,27 @@ module Growwer
|
|
|
99
129
|
# @return true if the model is valid
|
|
100
130
|
def valid?
|
|
101
131
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
132
|
+
typology_validator = EnumAttributeValidator.new('String', ["blog", "press"])
|
|
133
|
+
return false unless typology_validator.valid?(@typology)
|
|
102
134
|
true
|
|
103
135
|
end
|
|
104
136
|
|
|
137
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
138
|
+
# @param [Object] typology Object to be assigned
|
|
139
|
+
def typology=(typology)
|
|
140
|
+
validator = EnumAttributeValidator.new('String', ["blog", "press"])
|
|
141
|
+
unless validator.valid?(typology)
|
|
142
|
+
fail ArgumentError, "invalid value for \"typology\", must be one of #{validator.allowable_values}."
|
|
143
|
+
end
|
|
144
|
+
@typology = typology
|
|
145
|
+
end
|
|
146
|
+
|
|
105
147
|
# Checks equality by comparing each attribute.
|
|
106
148
|
# @param [Object] Object to be compared
|
|
107
149
|
def ==(o)
|
|
108
150
|
return true if self.equal?(o)
|
|
109
151
|
self.class == o.class &&
|
|
152
|
+
typology == o.typology &&
|
|
110
153
|
post_offer == o.post_offer &&
|
|
111
154
|
link_addition_offer == o.link_addition_offer &&
|
|
112
155
|
extra_services == o.extra_services
|
|
@@ -121,7 +164,7 @@ module Growwer
|
|
|
121
164
|
# Calculates hash code according to all attributes.
|
|
122
165
|
# @return [Integer] Hash code
|
|
123
166
|
def hash
|
|
124
|
-
[post_offer, link_addition_offer, extra_services].hash
|
|
167
|
+
[typology, post_offer, link_addition_offer, extra_services].hash
|
|
125
168
|
end
|
|
126
169
|
|
|
127
170
|
# Builds the object from hash
|
|
@@ -17,10 +17,41 @@ module Growwer
|
|
|
17
17
|
class UpdateSellerMediaRequestPostOffer < ApiModelBase
|
|
18
18
|
attr_accessor :pricing_options
|
|
19
19
|
|
|
20
|
+
attr_accessor :maximum_links
|
|
21
|
+
|
|
22
|
+
attr_accessor :advertising_labelling_policy
|
|
23
|
+
|
|
24
|
+
attr_accessor :promoted_social_networks
|
|
25
|
+
|
|
26
|
+
class EnumAttributeValidator
|
|
27
|
+
attr_reader :datatype
|
|
28
|
+
attr_reader :allowable_values
|
|
29
|
+
|
|
30
|
+
def initialize(datatype, allowable_values)
|
|
31
|
+
@allowable_values = allowable_values.map do |value|
|
|
32
|
+
case datatype.to_s
|
|
33
|
+
when /Integer/i
|
|
34
|
+
value.to_i
|
|
35
|
+
when /Float/i
|
|
36
|
+
value.to_f
|
|
37
|
+
else
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def valid?(value)
|
|
44
|
+
!value || allowable_values.include?(value)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
20
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
49
|
def self.attribute_map
|
|
22
50
|
{
|
|
23
|
-
:'pricing_options' => :'pricingOptions'
|
|
51
|
+
:'pricing_options' => :'pricingOptions',
|
|
52
|
+
:'maximum_links' => :'maximumLinks',
|
|
53
|
+
:'advertising_labelling_policy' => :'advertisingLabellingPolicy',
|
|
54
|
+
:'promoted_social_networks' => :'promotedSocialNetworks'
|
|
24
55
|
}
|
|
25
56
|
end
|
|
26
57
|
|
|
@@ -37,7 +68,10 @@ module Growwer
|
|
|
37
68
|
# Attribute type mapping.
|
|
38
69
|
def self.openapi_types
|
|
39
70
|
{
|
|
40
|
-
:'pricing_options' => :'Array<UpdateSellerMediaRequestPostOfferPricingOptionsInner>'
|
|
71
|
+
:'pricing_options' => :'Array<UpdateSellerMediaRequestPostOfferPricingOptionsInner>',
|
|
72
|
+
:'maximum_links' => :'Integer',
|
|
73
|
+
:'advertising_labelling_policy' => :'String',
|
|
74
|
+
:'promoted_social_networks' => :'Array<String>'
|
|
41
75
|
}
|
|
42
76
|
end
|
|
43
77
|
|
|
@@ -67,8 +101,20 @@ module Growwer
|
|
|
67
101
|
if (value = attributes[:'pricing_options']).is_a?(Array)
|
|
68
102
|
self.pricing_options = value
|
|
69
103
|
end
|
|
70
|
-
|
|
71
|
-
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'maximum_links')
|
|
107
|
+
self.maximum_links = attributes[:'maximum_links']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'advertising_labelling_policy')
|
|
111
|
+
self.advertising_labelling_policy = attributes[:'advertising_labelling_policy']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'promoted_social_networks')
|
|
115
|
+
if (value = attributes[:'promoted_social_networks']).is_a?(Array)
|
|
116
|
+
self.promoted_social_networks = value
|
|
117
|
+
end
|
|
72
118
|
end
|
|
73
119
|
end
|
|
74
120
|
|
|
@@ -77,12 +123,16 @@ module Growwer
|
|
|
77
123
|
def list_invalid_properties
|
|
78
124
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
79
125
|
invalid_properties = Array.new
|
|
80
|
-
if
|
|
81
|
-
invalid_properties.push('invalid value for "pricing_options",
|
|
126
|
+
if !@pricing_options.nil? && @pricing_options.length < 1
|
|
127
|
+
invalid_properties.push('invalid value for "pricing_options", number of items must be greater than or equal to 1.')
|
|
82
128
|
end
|
|
83
129
|
|
|
84
|
-
if
|
|
85
|
-
invalid_properties.push('invalid value for "
|
|
130
|
+
if !@maximum_links.nil? && @maximum_links > 4
|
|
131
|
+
invalid_properties.push('invalid value for "maximum_links", must be smaller than or equal to 4.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if !@maximum_links.nil? && @maximum_links < 1
|
|
135
|
+
invalid_properties.push('invalid value for "maximum_links", must be greater than or equal to 1.')
|
|
86
136
|
end
|
|
87
137
|
|
|
88
138
|
invalid_properties
|
|
@@ -92,8 +142,11 @@ module Growwer
|
|
|
92
142
|
# @return true if the model is valid
|
|
93
143
|
def valid?
|
|
94
144
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
95
|
-
return false if
|
|
96
|
-
return false if
|
|
145
|
+
return false if !@pricing_options.nil? && @pricing_options.length < 1
|
|
146
|
+
return false if !@maximum_links.nil? && @maximum_links > 4
|
|
147
|
+
return false if !@maximum_links.nil? && @maximum_links < 1
|
|
148
|
+
advertising_labelling_policy_validator = EnumAttributeValidator.new('String', ["always", "never"])
|
|
149
|
+
return false unless advertising_labelling_policy_validator.valid?(@advertising_labelling_policy)
|
|
97
150
|
true
|
|
98
151
|
end
|
|
99
152
|
|
|
@@ -111,12 +164,43 @@ module Growwer
|
|
|
111
164
|
@pricing_options = pricing_options
|
|
112
165
|
end
|
|
113
166
|
|
|
167
|
+
# Custom attribute writer method with validation
|
|
168
|
+
# @param [Object] maximum_links Value to be assigned
|
|
169
|
+
def maximum_links=(maximum_links)
|
|
170
|
+
if maximum_links.nil?
|
|
171
|
+
fail ArgumentError, 'maximum_links cannot be nil'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if maximum_links > 4
|
|
175
|
+
fail ArgumentError, 'invalid value for "maximum_links", must be smaller than or equal to 4.'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if maximum_links < 1
|
|
179
|
+
fail ArgumentError, 'invalid value for "maximum_links", must be greater than or equal to 1.'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
@maximum_links = maximum_links
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
186
|
+
# @param [Object] advertising_labelling_policy Object to be assigned
|
|
187
|
+
def advertising_labelling_policy=(advertising_labelling_policy)
|
|
188
|
+
validator = EnumAttributeValidator.new('String', ["always", "never"])
|
|
189
|
+
unless validator.valid?(advertising_labelling_policy)
|
|
190
|
+
fail ArgumentError, "invalid value for \"advertising_labelling_policy\", must be one of #{validator.allowable_values}."
|
|
191
|
+
end
|
|
192
|
+
@advertising_labelling_policy = advertising_labelling_policy
|
|
193
|
+
end
|
|
194
|
+
|
|
114
195
|
# Checks equality by comparing each attribute.
|
|
115
196
|
# @param [Object] Object to be compared
|
|
116
197
|
def ==(o)
|
|
117
198
|
return true if self.equal?(o)
|
|
118
199
|
self.class == o.class &&
|
|
119
|
-
pricing_options == o.pricing_options
|
|
200
|
+
pricing_options == o.pricing_options &&
|
|
201
|
+
maximum_links == o.maximum_links &&
|
|
202
|
+
advertising_labelling_policy == o.advertising_labelling_policy &&
|
|
203
|
+
promoted_social_networks == o.promoted_social_networks
|
|
120
204
|
end
|
|
121
205
|
|
|
122
206
|
# @see the `==` method
|
|
@@ -128,7 +212,7 @@ module Growwer
|
|
|
128
212
|
# Calculates hash code according to all attributes.
|
|
129
213
|
# @return [Integer] Hash code
|
|
130
214
|
def hash
|
|
131
|
-
[pricing_options].hash
|
|
215
|
+
[pricing_options, maximum_links, advertising_labelling_policy, promoted_social_networks].hash
|
|
132
216
|
end
|
|
133
217
|
|
|
134
218
|
# Builds the object from hash
|
data/lib/growwer/version.rb
CHANGED
data/lib/growwer.rb
CHANGED
|
@@ -31,6 +31,8 @@ require 'growwer/models/code_name'
|
|
|
31
31
|
require 'growwer/models/count_saved_filter_medias200_response'
|
|
32
32
|
require 'growwer/models/create_project_request'
|
|
33
33
|
require 'growwer/models/create_saved_filter_request'
|
|
34
|
+
require 'growwer/models/create_seller_media_request'
|
|
35
|
+
require 'growwer/models/create_seller_media_request_post_offer'
|
|
34
36
|
require 'growwer/models/error'
|
|
35
37
|
require 'growwer/models/get_buyer_wallet200_response'
|
|
36
38
|
require 'growwer/models/get_me200_response'
|
|
@@ -94,6 +96,7 @@ require 'growwer/models/post_order_briefing_request'
|
|
|
94
96
|
require 'growwer/models/project'
|
|
95
97
|
require 'growwer/models/project_catalogue_media'
|
|
96
98
|
require 'growwer/models/project_catalogue_media_all_of_project'
|
|
99
|
+
require 'growwer/models/project_catalogue_media_all_of_project_ai_keywords'
|
|
97
100
|
require 'growwer/models/put_seller_holiday200_response'
|
|
98
101
|
require 'growwer/models/put_seller_holiday_request'
|
|
99
102
|
require 'growwer/models/request_medias201_response'
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Growwer API
|
|
3
|
+
|
|
4
|
+
#The Growwer customer API. Authenticate every call with an API key created on your profile page, sent as `Authorization: Bearer <key>`. A read key can call every GET operation; writes need a read and write key and an `Idempotency-Key` header. Idempotency: use a new `Idempotency-Key` (1 to 255 printable ASCII characters without spaces) for each operation and reuse it only to retry that same operation. Keys belong to your account, not to one API key. - A successful write is stored for 30 days: a retry with the same key and the same request replays its response with `Idempotent-Replayed: true` and does nothing again. - A refused write (4xx) has no effect and releases its key: once you fix the cause, retry with the same key and the write runs. - A failed write (5xx) may have taken effect, so it is never run again under its key: a retry gets 409 `idempotency_outcome_unknown`. Check whether it took effect before retrying with a new key. - A retry while the first request is still running gets 409 `idempotency_request_in_progress`. A request still running after 5 minutes is treated as failed: a retry gets 409 `idempotency_outcome_unknown`. - The same key with a different request (method, path, query or body) gets 409 `idempotency_key_reused`. A write without the header gets 400 `idempotency_key_required`. Every response carries `X-Request-Id`. Errors share one shape, `{code, message, requestId, details?}`. Money is integer cents plus a currency code and dates are ISO-8601.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1
|
|
7
|
+
Contact: support@growwer.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::CreateSellerMediaRequestPostOffer
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::CreateSellerMediaRequestPostOffer do
|
|
21
|
+
#let(:instance) { Growwer::CreateSellerMediaRequestPostOffer.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateSellerMediaRequestPostOffer' do
|
|
24
|
+
it 'should create an instance of CreateSellerMediaRequestPostOffer' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::CreateSellerMediaRequestPostOffer)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "pricing_options"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "maximum_links"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "advertising_labelling_policy"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["always", "never"])
|
|
46
|
+
# validator.allowable_values.each do |value|
|
|
47
|
+
# expect { instance.advertising_labelling_policy = value }.not_to raise_error
|
|
48
|
+
# end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
describe 'test attribute "promoted_social_networks"' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
55
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["twitter", "instagram", "facebook", "pinterest", "tumblr", "newsletter"])
|
|
56
|
+
# validator.allowable_values.each do |value|
|
|
57
|
+
# expect { instance.promoted_social_networks = value }.not_to raise_error
|
|
58
|
+
# end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Growwer API
|
|
3
|
+
|
|
4
|
+
#The Growwer customer API. Authenticate every call with an API key created on your profile page, sent as `Authorization: Bearer <key>`. A read key can call every GET operation; writes need a read and write key and an `Idempotency-Key` header. Idempotency: use a new `Idempotency-Key` (1 to 255 printable ASCII characters without spaces) for each operation and reuse it only to retry that same operation. Keys belong to your account, not to one API key. - A successful write is stored for 30 days: a retry with the same key and the same request replays its response with `Idempotent-Replayed: true` and does nothing again. - A refused write (4xx) has no effect and releases its key: once you fix the cause, retry with the same key and the write runs. - A failed write (5xx) may have taken effect, so it is never run again under its key: a retry gets 409 `idempotency_outcome_unknown`. Check whether it took effect before retrying with a new key. - A retry while the first request is still running gets 409 `idempotency_request_in_progress`. A request still running after 5 minutes is treated as failed: a retry gets 409 `idempotency_outcome_unknown`. - The same key with a different request (method, path, query or body) gets 409 `idempotency_key_reused`. A write without the header gets 400 `idempotency_key_required`. Every response carries `X-Request-Id`. Errors share one shape, `{code, message, requestId, details?}`. Money is integer cents plus a currency code and dates are ISO-8601.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1
|
|
7
|
+
Contact: support@growwer.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::CreateSellerMediaRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::CreateSellerMediaRequest do
|
|
21
|
+
#let(:instance) { Growwer::CreateSellerMediaRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateSellerMediaRequest' do
|
|
24
|
+
it 'should create an instance of CreateSellerMediaRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::CreateSellerMediaRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "root_url"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "typology"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["blog", "press"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.typology = value }.not_to raise_error
|
|
42
|
+
# end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe 'test attribute "country"' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
describe 'test attribute "language"' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
describe 'test attribute "topics"' do
|
|
59
|
+
it 'should work' do
|
|
60
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
describe 'test attribute "banned_topics"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
describe 'test attribute "post_offer"' do
|
|
71
|
+
it 'should work' do
|
|
72
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
describe 'test attribute "link_addition_offer"' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
describe 'test attribute "extra_services"' do
|
|
83
|
+
it 'should work' do
|
|
84
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
describe 'test attribute "accept_media_publishing_terms"' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
describe 'test attribute "declare_media_ownership"' do
|
|
95
|
+
it 'should work' do
|
|
96
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Growwer API
|
|
3
|
+
|
|
4
|
+
#The Growwer customer API. Authenticate every call with an API key created on your profile page, sent as `Authorization: Bearer <key>`. A read key can call every GET operation; writes need a read and write key and an `Idempotency-Key` header. Idempotency: use a new `Idempotency-Key` (1 to 255 printable ASCII characters without spaces) for each operation and reuse it only to retry that same operation. Keys belong to your account, not to one API key. - A successful write is stored for 30 days: a retry with the same key and the same request replays its response with `Idempotent-Replayed: true` and does nothing again. - A refused write (4xx) has no effect and releases its key: once you fix the cause, retry with the same key and the write runs. - A failed write (5xx) may have taken effect, so it is never run again under its key: a retry gets 409 `idempotency_outcome_unknown`. Check whether it took effect before retrying with a new key. - A retry while the first request is still running gets 409 `idempotency_request_in_progress`. A request still running after 5 minutes is treated as failed: a retry gets 409 `idempotency_outcome_unknown`. - The same key with a different request (method, path, query or body) gets 409 `idempotency_key_reused`. A write without the header gets 400 `idempotency_key_required`. Every response carries `X-Request-Id`. Errors share one shape, `{code, message, requestId, details?}`. Money is integer cents plus a currency code and dates are ISO-8601.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1
|
|
7
|
+
Contact: support@growwer.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::ProjectCatalogueMediaAllOfProjectAiKeywords
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::ProjectCatalogueMediaAllOfProjectAiKeywords do
|
|
21
|
+
#let(:instance) { Growwer::ProjectCatalogueMediaAllOfProjectAiKeywords.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ProjectCatalogueMediaAllOfProjectAiKeywords' do
|
|
24
|
+
it 'should create an instance of ProjectCatalogueMediaAllOfProjectAiKeywords' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::ProjectCatalogueMediaAllOfProjectAiKeywords)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "keyword"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "source"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["googleAiOverview", "chatgpt", "googleAiMode"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.source = value }.not_to raise_error
|
|
42
|
+
# end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|