facebookbusiness 0.16.0.0 → 0.16.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/facebook_ads/ad_objects/business.rb +210 -0
- data/lib/facebook_ads/ad_objects/server_side/app_data.rb +269 -0
- data/lib/facebook_ads/ad_objects/server_side/event.rb +21 -1
- data/lib/facebook_ads/ad_objects/server_side/extended_device_info.rb +344 -0
- data/lib/facebook_ads/ad_objects/server_side/user_data.rb +67 -2
- data/lib/facebook_ads/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d23f8de09b10d1d1d6fabaca98ca983c793c1ce7438e28bc107419b34375e0a
|
4
|
+
data.tar.gz: 76c47ff4a628b9cfa860b58d1ba51ad0b841638bc96423ef4e0189af9724214f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 275d9b8328e3bfc83c568ea4e884bbda3458caa41d9a771c2524892ec3368fae9f85ce2e1ed140a23492d4f2821a71ddacf0ae5d192ede171377cd2792c9b59f
|
7
|
+
data.tar.gz: d96b110ec30f7cd72119aadc97699aaa6a3eafa6372d8ec8b402656ff692d38f5a7bfe04679837e745fe29765daec665df55eda1577c82e1d6afeea6adc9a855
|
@@ -120,6 +120,206 @@ module FacebookAds
|
|
120
120
|
"VIEW_MONETIZATION_INSIGHTS",
|
121
121
|
]
|
122
122
|
|
123
|
+
SUBVERTICAL_V2 = [
|
124
|
+
"ACCOUNTING_AND_TAX",
|
125
|
+
"ACTIVITIES_AND_LEISURE",
|
126
|
+
"AIR",
|
127
|
+
"APPAREL_AND_ACCESSORIES",
|
128
|
+
"ARTS_AND_HERITAGE_AND_EDUCATION",
|
129
|
+
"AR_OR_VR_GAMING",
|
130
|
+
"AUDIO_STREAMING",
|
131
|
+
"AUTO",
|
132
|
+
"AUTO_INSURANCE",
|
133
|
+
"AUTO_RENTAL",
|
134
|
+
"BABY",
|
135
|
+
"BALLOT_INITIATIVE_OR_REFERENDUM",
|
136
|
+
"BEAUTY",
|
137
|
+
"BEAUTY_AND_FASHION",
|
138
|
+
"BEER_AND_WINE_AND_LIQUOR_AND_MALT_BEVERAGES",
|
139
|
+
"BOOKSTORES",
|
140
|
+
"BROADCAST_TELEVISION",
|
141
|
+
"BUSINESS_CONSULTANTS",
|
142
|
+
"BUYING_AGENCY",
|
143
|
+
"CABLE_AND_SATELLITE",
|
144
|
+
"CABLE_TELEVISION",
|
145
|
+
"CALL_CENTER_AND_MESSAGING_SERVICES",
|
146
|
+
"CANDIDATE_OR_POLITICIAN",
|
147
|
+
"CAREER",
|
148
|
+
"CAREER_AND_TECH",
|
149
|
+
"CASUAL_DINING",
|
150
|
+
"CHRONIC_CONDITIONS_AND_MEDICAL_CAUSES",
|
151
|
+
"CIVIC_INFLUENCERS",
|
152
|
+
"CLINICAL_TRIALS",
|
153
|
+
"COFFEE",
|
154
|
+
"COMPUTER_AND_SOFTWARE_AND_HARDWARE",
|
155
|
+
"CONSOLE_AND_CROSS_PLATFORM_GAMING",
|
156
|
+
"CONSULTING",
|
157
|
+
"CONSUMER_ELECTRONICS",
|
158
|
+
"COUNSELING_AND_PSYCHOTHERAPY",
|
159
|
+
"CREATIVE_AGENCY",
|
160
|
+
"CREDIT_AND_FINANCING_AND_MORTAGES",
|
161
|
+
"CRUISES_AND_MARINE",
|
162
|
+
"CULTURE_AND_LIFESTYLE",
|
163
|
+
"DATA_ANALYTICS_AND_DATA_MANAGEMENT",
|
164
|
+
"DATING_AND_TECHNOLOGY_APPS",
|
165
|
+
"DEPARTMENT_STORE",
|
166
|
+
"DESKTOP_SOFTWARE",
|
167
|
+
"DIETING_AND_FITNESS_PROGRAMS",
|
168
|
+
"DIGITAL_NATIVE_EDUCATION_OR_TRAINING",
|
169
|
+
"DRINKING_PLACES",
|
170
|
+
"EDUCATION_RESOURCES",
|
171
|
+
"ED_TECH",
|
172
|
+
"ELEARNING_AND_MASSIVE_ONLINE_OPEN_COURSES",
|
173
|
+
"ELECTION_COMMISSION",
|
174
|
+
"ELECTRONICS_AND_APPLIANCES",
|
175
|
+
"ENGINEERING_AND_DESIGN",
|
176
|
+
"ENVIRONMENT_AND_ANIMAL_WELFARE",
|
177
|
+
"ESPORTS",
|
178
|
+
"EVENTS",
|
179
|
+
"FARMING_AND_RANCHING",
|
180
|
+
"FILE_STORAGE_AND_CLOUD_AND_DATA_SERVICES",
|
181
|
+
"FINANCE",
|
182
|
+
"FIN_TECH",
|
183
|
+
"FISHING_AND_HUNTING_AND_FORESTRY_AND_LOGGING",
|
184
|
+
"FITNESS",
|
185
|
+
"FOOD",
|
186
|
+
"FOOTWEAR",
|
187
|
+
"FOR_PROFIT_COLLEGES_AND_UNIVERSITIES",
|
188
|
+
"FULL_SERVICE_AGENCY",
|
189
|
+
"GOVERNMENT_CONTROLLED_ENTITY",
|
190
|
+
"GOVERNMENT_DEPARTMENT_OR_AGENCY",
|
191
|
+
"GOVERNMENT_OFFICIAL",
|
192
|
+
"GOVERNMENT_OWNED_MEDIA",
|
193
|
+
"GROCERY_AND_DRUG_AND_CONVENIENCE",
|
194
|
+
"HEAD_OF_STATE",
|
195
|
+
"HEALTH_INSURANCE",
|
196
|
+
"HEALTH_SYSTEMS_AND_PRACTITIONERS",
|
197
|
+
"HEALTH_TECH",
|
198
|
+
"HOME_AND_FURNITURE_AND_OFFICE",
|
199
|
+
"HOME_IMPROVEMENT",
|
200
|
+
"HOME_INSURANCE",
|
201
|
+
"HOME_TECH",
|
202
|
+
"HOTEL_AND_ACCOMODATION",
|
203
|
+
"HOUSEHOLD_GOODS_DURABLE",
|
204
|
+
"HOUSEHOLD_GOODS_NON_DURABLE",
|
205
|
+
"HR_AND_FINANCIAL_MANAGEMENT",
|
206
|
+
"HUMANITARIAN_OR_DISASTER_RELIEF",
|
207
|
+
"INDEPENDENT_EXPENDITURE_GROUP",
|
208
|
+
"INSURANCE_TECH",
|
209
|
+
"INTERNATIONAL_ORGANIZATON",
|
210
|
+
"INVESTMENT_BANK_AND_BROKERAGE",
|
211
|
+
"ISSUE_ADVOCACY",
|
212
|
+
"LEGAL",
|
213
|
+
"LIFE_INSURANCE",
|
214
|
+
"LOGISTICS_AND_TRANSPORTATION_AND_FLEET_MANAGEMENT",
|
215
|
+
"MANUFACTURING",
|
216
|
+
"MEDICAL_DEVICES_AND_SUPPLIES_AND_EQUIPMENT",
|
217
|
+
"MEDSPA_AND_ELECTIVE_SURGERIES_AND_ALTERNATIVE_MEDICINE",
|
218
|
+
"MINING_AND_QUARRYING",
|
219
|
+
"MOBILE_GAMING",
|
220
|
+
"MOVIES",
|
221
|
+
"MUSEUMS_AND_PARKS_AND_LIBRARIES",
|
222
|
+
"MUSIC",
|
223
|
+
"NETWORK_SECURITY_PRODUCTS",
|
224
|
+
"NEWS_AND_CURRENT_EVENTS",
|
225
|
+
"NON_PRESCRIPTION",
|
226
|
+
"NOT_FOR_PROFIT_COLLEGES_AND_UNIVERSITIES",
|
227
|
+
"OFFICE",
|
228
|
+
"OFFICE_OR_BUSINESS_SUPPLIES",
|
229
|
+
"OIL_AND_GAS_AND_CONSUMABLE_FUEL",
|
230
|
+
"ONLINE_ONLY_PUBLICATIONS",
|
231
|
+
"PACKAGE_OR_FREIGHT_DELIVERY",
|
232
|
+
"PARTY_INDEPENDENT_EXPENDITURE_GROUP_US",
|
233
|
+
"PAYMENT_PROCESSING_AND_GATEWAY_SOLUTIONS",
|
234
|
+
"PC_GAMING",
|
235
|
+
"PEOPLE",
|
236
|
+
"PERSONAL_CARE",
|
237
|
+
"PET",
|
238
|
+
"PHOTOGRAPHY_AND_FILMING_SERVICES",
|
239
|
+
"PIZZA",
|
240
|
+
"PLANNING_AGENCY",
|
241
|
+
"POLITICAL_PARTY_OR_COMMITTEE",
|
242
|
+
"PRESCRIPTION",
|
243
|
+
"PROFESSIONAL_ASSOCIATIONS",
|
244
|
+
"PROPERTY_AND_CASUALTY",
|
245
|
+
"QUICK_SERVICE",
|
246
|
+
"RADIO",
|
247
|
+
"RAILROADS",
|
248
|
+
"REAL_ESTATE",
|
249
|
+
"REAL_MONEY_GAMING",
|
250
|
+
"RECREATIONAL",
|
251
|
+
"RELIGIOUS",
|
252
|
+
"RESELLER",
|
253
|
+
"RESIDENTIAL_AND_LONG_TERM_CARE_FACILITIES_AND_OUTPATIENT_CARE_CENTERS",
|
254
|
+
"RETAIL_AND_CREDIT_UNION_AND_COMMERCIAL_BANK",
|
255
|
+
"RIDE_SHARING_OR_TAXI_SERVICES",
|
256
|
+
"SAFETY_SERVICES",
|
257
|
+
"SCHOLARLY",
|
258
|
+
"SCHOOL_AND_EARLY_CHILDREN_EDCATION",
|
259
|
+
"SOCIAL_MEDIA",
|
260
|
+
"SOFTWARE_AS_A_SERVICE",
|
261
|
+
"SPORTING",
|
262
|
+
"SPORTING_AND_OUTDOOR",
|
263
|
+
"SPORTS",
|
264
|
+
"SUPERSTORES",
|
265
|
+
"T1_AUTOMOTIVE_MANUFACTURER",
|
266
|
+
"T1_MOTORCYCLE",
|
267
|
+
"T2_DEALER_ASSOCIATIONS",
|
268
|
+
"T3_AUTO_AGENCY",
|
269
|
+
"T3_AUTO_RESELLERS",
|
270
|
+
"T3_DEALER_GROUPS",
|
271
|
+
"T3_FRANCHISE_DEALER",
|
272
|
+
"T3_INDEPENDENT_DEALER",
|
273
|
+
"T3_PARTS_AND_SERVICES",
|
274
|
+
"T3_PORTALS",
|
275
|
+
"TELECOMMUNICATIONS_EQUIPMENT_AND_ACCESSORIES",
|
276
|
+
"TELEPHONE_SERVICE_PROVIDERS_AND_CARRIERS",
|
277
|
+
"TICKETING",
|
278
|
+
"TOBACCO",
|
279
|
+
"TOURISM_AND_TRAVEL_SERVICES",
|
280
|
+
"TOURISM_BOARD",
|
281
|
+
"TOY_AND_HOBBY",
|
282
|
+
"TRADE_SCHOOL",
|
283
|
+
"TRAVEL_AGENCIES_AND_GUIDES_AND_OTAS",
|
284
|
+
"UTILITIES_AND_ENERGY_EQUIPMENT_AND_SERVICES",
|
285
|
+
"VETERINARY_CLINICS_AND_SERVICES",
|
286
|
+
"VIDEO_STREAMING",
|
287
|
+
"VIRTUAL_SERVICES",
|
288
|
+
"VITAMINS_OR_WELLNESS",
|
289
|
+
"WAREHOUSING_AND_STORAGE",
|
290
|
+
"WATER_AND_SOFT_DRINK_AND_BAVERAGE",
|
291
|
+
"WEBSITE_DESIGNERS_OR_GRAPHIC_DESIGNERS",
|
292
|
+
"WHOLESALE",
|
293
|
+
"WIRELESS_SERVICES",
|
294
|
+
]
|
295
|
+
|
296
|
+
VERTICAL_V2 = [
|
297
|
+
"ADVERTISING_AND_MARKETING",
|
298
|
+
"AGRICULTURE",
|
299
|
+
"AUTOMOTIVE",
|
300
|
+
"BANKING_AND_CREDIT_CARDS",
|
301
|
+
"BUSINESS_TO_BUSINESS",
|
302
|
+
"CONSUMER_PACKAGED_GOODS",
|
303
|
+
"ECOMMERCE",
|
304
|
+
"EDUCATION",
|
305
|
+
"ENERGY_AND_NATURAL_RESOURCES_AND_UTILITIES",
|
306
|
+
"ENTERTAINMENT_AND_MEDIA",
|
307
|
+
"GAMING",
|
308
|
+
"GOVERNMENT",
|
309
|
+
"HEALTHCARE_AND_PHARMACEUTICALS_AND_BIOTECH",
|
310
|
+
"INSURANCE",
|
311
|
+
"NON_PROFIT",
|
312
|
+
"ORGANIZATIONS_AND_ASSOCIATIONS",
|
313
|
+
"POLITICS",
|
314
|
+
"PROFESSIONAL_SERVICES",
|
315
|
+
"PUBLISHING",
|
316
|
+
"RESTAURANTS",
|
317
|
+
"RETAIL",
|
318
|
+
"TECHNOLOGY",
|
319
|
+
"TELECOM",
|
320
|
+
"TRAVEL",
|
321
|
+
]
|
322
|
+
|
123
323
|
ACTION_SOURCE = [
|
124
324
|
"PHYSICAL_STORE",
|
125
325
|
"WEBSITE",
|
@@ -670,6 +870,16 @@ module FacebookAds
|
|
670
870
|
end
|
671
871
|
end
|
672
872
|
|
873
|
+
has_edge :setup_managed_partner_adaccounts do |edge|
|
874
|
+
edge.post 'Business' do |api|
|
875
|
+
api.has_param :credit_line_id, 'string'
|
876
|
+
api.has_param :marketplace_business_id, 'string'
|
877
|
+
api.has_param :subvertical_v2, { enum: -> { Business::SUBVERTICAL_V2 }}
|
878
|
+
api.has_param :vendor_id, 'string'
|
879
|
+
api.has_param :vertical_v2, { enum: -> { Business::VERTICAL_V2 }}
|
880
|
+
end
|
881
|
+
end
|
882
|
+
|
673
883
|
has_edge :system_users do |edge|
|
674
884
|
edge.get 'SystemUser'
|
675
885
|
edge.post 'SystemUser' do |api|
|
@@ -0,0 +1,269 @@
|
|
1
|
+
# Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
|
4
|
+
# copy, modify, and distribute this software in source code or binary form for use
|
5
|
+
# in connection with the web services and APIs provided by Facebook.
|
6
|
+
#
|
7
|
+
# As with any software that integrates with the Facebook platform, your use of
|
8
|
+
# this software is subject to the Facebook Platform Policy
|
9
|
+
# [http://developers.facebook.com/policy/]. This copyright notice shall be
|
10
|
+
# included in all copies or substantial portions of the software.
|
11
|
+
#
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
14
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
15
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
16
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
17
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
|
+
|
19
|
+
module FacebookAds
|
20
|
+
module ServerSide
|
21
|
+
# AppData which contains app data and device information for events happening from an app.
|
22
|
+
class AppData
|
23
|
+
# Use this field to specify ATT permission on an iOS 14.5+ device. Set to 0 for disabled or 1 for enabled.
|
24
|
+
attr_accessor :application_tracking_enabled
|
25
|
+
|
26
|
+
# A person can choose to enable ad tracking on an app level. Your SDK should allow an app developer to put an opt-out setting into their app. Use this field to specify the person's choice. Use 0 for disabled, 1 for enabled. `
|
27
|
+
attr_accessor :advertiser_tracking_enabled
|
28
|
+
|
29
|
+
# Specifies that view through data should be considered when determining the ad to attribute this install to. Clicks will always be considered first before views and views will only be returned if there was not a click on an ad for the app
|
30
|
+
attr_accessor :consider_views
|
31
|
+
|
32
|
+
# Extended device information, such as screen width and height.
|
33
|
+
attr_accessor :extinfo
|
34
|
+
|
35
|
+
# Specifies that view dwell ms should be returned as part of view through data
|
36
|
+
attr_accessor :include_dwell_data
|
37
|
+
|
38
|
+
# Specifies that video view completion percentages should be returned as part of view through data
|
39
|
+
attr_accessor :include_video_data
|
40
|
+
|
41
|
+
# Third party install referrer, currently available for Android only, see here for more.
|
42
|
+
attr_accessor :install_referrer
|
43
|
+
|
44
|
+
# Used internally by the Android SDKs
|
45
|
+
attr_accessor :installer_package
|
46
|
+
|
47
|
+
# Used internally by the iOS and Android SDKs.
|
48
|
+
attr_accessor :url_schemes
|
49
|
+
|
50
|
+
# Attribution token used for Windows 10.
|
51
|
+
attr_accessor :windows_attribution_id
|
52
|
+
|
53
|
+
# @param [Boolean] application_tracking_enabled
|
54
|
+
# @param [Boolean] advertiser_tracking_enabled
|
55
|
+
# @param [Boolean] consider_views
|
56
|
+
# @param [ExtendedDeviceInfo] extinfo
|
57
|
+
# @param [Boolean] include_dwell_data
|
58
|
+
# @param [Boolean] include_video_data
|
59
|
+
# @param [String] install_referrer
|
60
|
+
# @param [String] installer_package
|
61
|
+
# @param [Array<String>] url_schemes
|
62
|
+
# @param [String] windows_attribution_id
|
63
|
+
def initialize(application_tracking_enabled: nil,
|
64
|
+
advertiser_tracking_enabled: nil,
|
65
|
+
consider_views: nil,
|
66
|
+
extinfo: nil,
|
67
|
+
include_dwell_data: nil,
|
68
|
+
include_video_data: nil,
|
69
|
+
install_referrer: nil,
|
70
|
+
installer_package: nil,
|
71
|
+
url_schemes: nil,
|
72
|
+
windows_attribution_id: nil)
|
73
|
+
|
74
|
+
unless application_tracking_enabled.nil?
|
75
|
+
self.application_tracking_enabled = application_tracking_enabled
|
76
|
+
end
|
77
|
+
unless advertiser_tracking_enabled.nil?
|
78
|
+
self.advertiser_tracking_enabled = advertiser_tracking_enabled
|
79
|
+
end
|
80
|
+
unless consider_views.nil?
|
81
|
+
self.consider_views = consider_views
|
82
|
+
end
|
83
|
+
unless extinfo.nil?
|
84
|
+
self.extinfo = extinfo
|
85
|
+
end
|
86
|
+
unless include_dwell_data.nil?
|
87
|
+
self.include_dwell_data = include_dwell_data
|
88
|
+
end
|
89
|
+
unless include_video_data.nil?
|
90
|
+
self.include_video_data = include_video_data
|
91
|
+
end
|
92
|
+
unless install_referrer.nil?
|
93
|
+
self.install_referrer = install_referrer
|
94
|
+
end
|
95
|
+
unless installer_package.nil?
|
96
|
+
self.installer_package = installer_package
|
97
|
+
end
|
98
|
+
unless url_schemes.nil?
|
99
|
+
self.url_schemes = url_schemes
|
100
|
+
end
|
101
|
+
unless windows_attribution_id.nil?
|
102
|
+
self.windows_attribution_id = windows_attribution_id
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# build the object using the input hash
|
107
|
+
# @param [Hash] attributes attributes in the form of hash
|
108
|
+
def build(attributes = {})
|
109
|
+
return unless attributes.is_a?(Hash)
|
110
|
+
|
111
|
+
# convert string to symbol for hash key
|
112
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
113
|
+
|
114
|
+
if attributes.has_key?(:'application_tracking_enabled')
|
115
|
+
self.application_tracking_enabled = attributes[:'application_tracking_enabled']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.has_key?(:'advertiser_tracking_enabled')
|
119
|
+
self.advertiser_tracking_enabled = attributes[:'advertiser_tracking_enabled']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.has_key?(:'consider_views')
|
123
|
+
self.consider_views = attributes[:'consider_views']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.has_key?(:'extinfo')
|
127
|
+
self.extinfo = attributes[:'extinfo']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.has_key?(:'include_dwell_data')
|
131
|
+
self.include_dwell_data = attributes[:'include_dwell_data']
|
132
|
+
end
|
133
|
+
|
134
|
+
|
135
|
+
if attributes.has_key?(:'include_video_data')
|
136
|
+
self.include_video_data = attributes[:'include_video_data']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.has_key?(:'install_referrer')
|
140
|
+
self.install_referrer = attributes[:'install_referrer']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.has_key?(:'installer_package')
|
144
|
+
self.installer_package = attributes[:'installer_package']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.has_key?(:'url_schemes')
|
148
|
+
self.url_schemes = attributes[:'url_schemes']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'windows_attribution_id')
|
152
|
+
self.windows_attribution_id = attributes[:'windows_attribution_id']
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
# Checks equality by comparing each attribute.
|
157
|
+
def ==(o)
|
158
|
+
return true if self.equal?(o)
|
159
|
+
self.class == o.class &&
|
160
|
+
application_tracking_enabled == o.application_tracking_enabled &&
|
161
|
+
advertiser_tracking_enabled == o.advertiser_tracking_enabled &&
|
162
|
+
consider_views == o.consider_views &&
|
163
|
+
extinfo == o.extinfo &&
|
164
|
+
include_dwell_data == o.include_dwell_data &&
|
165
|
+
include_video_data == o.include_video_data &&
|
166
|
+
install_referrer == o.install_referrer &&
|
167
|
+
installer_package == o.installer_package &&
|
168
|
+
url_schemes == o.url_schemes &&
|
169
|
+
windows_attribution_id == o.windows_attribution_id
|
170
|
+
end
|
171
|
+
|
172
|
+
# @see the `==` method
|
173
|
+
def eql?(o)
|
174
|
+
self == o
|
175
|
+
end
|
176
|
+
|
177
|
+
# Calculates hash code according to all attributes.
|
178
|
+
# @return [Fixnum] Hash code
|
179
|
+
def hash
|
180
|
+
[
|
181
|
+
application_tracking_enabled,
|
182
|
+
advertiser_tracking_enabled,
|
183
|
+
consider_views,
|
184
|
+
extinfo,
|
185
|
+
include_dwell_data,
|
186
|
+
include_video_data,
|
187
|
+
install_referrer,
|
188
|
+
installer_package,
|
189
|
+
url_schemes,
|
190
|
+
windows_attribution_id
|
191
|
+
].hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the string representation of the object
|
195
|
+
# @return [String] String presentation of the object
|
196
|
+
def to_s
|
197
|
+
hash = {}
|
198
|
+
unless vapplication_tracking_enabledalue.nil?
|
199
|
+
hash['application_tracking_enabled'] = application_tracking_enabled
|
200
|
+
end
|
201
|
+
unless advertiser_tracking_enabled.nil?
|
202
|
+
hash['advertiser_tracking_enabled'] = advertiser_tracking_enabled
|
203
|
+
end
|
204
|
+
unless consider_views.nil?
|
205
|
+
hash['consider_views'] = consider_views
|
206
|
+
end
|
207
|
+
unless extinfo.nil?
|
208
|
+
hash['extinfo'] = extinfo.to_s
|
209
|
+
end
|
210
|
+
unless include_dwell_data.nil?
|
211
|
+
hash['include_dwell_data'] = include_dwell_data
|
212
|
+
end
|
213
|
+
unless include_video_data.nil?
|
214
|
+
hash['include_video_data'] = include_video_data
|
215
|
+
end
|
216
|
+
unless install_referrer.nil?
|
217
|
+
hash['install_referrer'] = install_referrer
|
218
|
+
end
|
219
|
+
unless installer_package.nil?
|
220
|
+
hash['installer_package'] = installer_package
|
221
|
+
end
|
222
|
+
unless url_schemes.nil?
|
223
|
+
hash['url_schemes'] = url_schemes.to_s
|
224
|
+
end
|
225
|
+
unless windows_attribution_id.nil?
|
226
|
+
hash['windows_attribution_id'] = windows_attribution_id
|
227
|
+
end
|
228
|
+
hash.to_s
|
229
|
+
end
|
230
|
+
|
231
|
+
# Normalize input fields to server request format.
|
232
|
+
def normalize
|
233
|
+
hash = {}
|
234
|
+
unless application_tracking_enabled.nil?
|
235
|
+
hash['application_tracking_enabled'] = application_tracking_enabled
|
236
|
+
end
|
237
|
+
unless advertiser_tracking_enabled.nil?
|
238
|
+
hash['advertiser_tracking_enabled'] = advertiser_tracking_enabled
|
239
|
+
end
|
240
|
+
unless consider_views.nil?
|
241
|
+
hash['consider_views'] = consider_views
|
242
|
+
end
|
243
|
+
unless include_dwell_data.nil?
|
244
|
+
hash['include_dwell_data'] = include_dwell_data
|
245
|
+
end
|
246
|
+
unless include_video_data.nil?
|
247
|
+
hash['include_video_data'] = include_video_data
|
248
|
+
end
|
249
|
+
unless install_referrer.nil?
|
250
|
+
hash['install_referrer'] = install_referrer
|
251
|
+
end
|
252
|
+
unless installer_package.nil?
|
253
|
+
hash['installer_package'] = installer_package
|
254
|
+
end
|
255
|
+
unless url_schemes.nil?
|
256
|
+
hash['url_schemes'] = url_schemes
|
257
|
+
end
|
258
|
+
unless windows_attribution_id.nil?
|
259
|
+
hash['windows_attribution_id'] = windows_attribution_id
|
260
|
+
end
|
261
|
+
|
262
|
+
unless extinfo.nil?
|
263
|
+
hash['extinfo'] = extinfo.normalize
|
264
|
+
end
|
265
|
+
hash
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require_relative './user_data'
|
20
20
|
require_relative './custom_data'
|
21
|
+
require_relative './app_data'
|
21
22
|
|
22
23
|
module FacebookAds
|
23
24
|
module ServerSide
|
@@ -52,6 +53,9 @@ module FacebookAds
|
|
52
53
|
# An Object that includes additional business data about the event.
|
53
54
|
attr_accessor :custom_data
|
54
55
|
|
56
|
+
# An Object that contains app data.
|
57
|
+
attr_accessor :app_data
|
58
|
+
|
55
59
|
# Processing options you would like to enable for a specific event.
|
56
60
|
# For more details see https://developers.facebook.com/docs/marketing-apis/data-processing-options
|
57
61
|
attr_accessor :data_processing_options
|
@@ -74,6 +78,7 @@ module FacebookAds
|
|
74
78
|
# @param [String] event_id
|
75
79
|
# @param [FacebookAds::ServerSide::UserData] user_data
|
76
80
|
# @param [FacebookAds::ServerSide::CustomData] custom_data
|
81
|
+
# @param [FacebookAds::ServerSide::AppData] app_data
|
77
82
|
# @param [Array<String>] data_processing_options
|
78
83
|
# @param [int] data_processing_options_country
|
79
84
|
# @param [int] data_processing_options_state
|
@@ -85,6 +90,7 @@ module FacebookAds
|
|
85
90
|
event_id: nil,
|
86
91
|
user_data: nil,
|
87
92
|
custom_data: nil,
|
93
|
+
app_data: nil,
|
88
94
|
data_processing_options: nil,
|
89
95
|
data_processing_options_country: nil,
|
90
96
|
data_processing_options_state: nil,
|
@@ -111,6 +117,9 @@ module FacebookAds
|
|
111
117
|
unless custom_data.nil?
|
112
118
|
self.custom_data = custom_data
|
113
119
|
end
|
120
|
+
unless app_data.nil?
|
121
|
+
self.app_data = app_data
|
122
|
+
end
|
114
123
|
unless data_processing_options.nil?
|
115
124
|
self.data_processing_options = data_processing_options
|
116
125
|
end
|
@@ -161,6 +170,10 @@ module FacebookAds
|
|
161
170
|
self.custom_data = attributes[:'custom_data']
|
162
171
|
end
|
163
172
|
|
173
|
+
if attributes.has_key?(:'app_data')
|
174
|
+
self.app_data = attributes[:'app_data']
|
175
|
+
end
|
176
|
+
|
164
177
|
if attributes.has_key?(:'data_processing_options')
|
165
178
|
self.data_processing_options = attributes[:'data_processing_options']
|
166
179
|
end
|
@@ -217,6 +230,7 @@ module FacebookAds
|
|
217
230
|
event_id == o.event_id &&
|
218
231
|
user_data == o.user_data &&
|
219
232
|
custom_data == o.custom_data &&
|
233
|
+
app_data == o.app_data &&
|
220
234
|
data_processing_options == o.data_processing_options &&
|
221
235
|
data_processing_options_country == o.data_processing_options_country &&
|
222
236
|
data_processing_options_state == o.data_processing_options_state &&
|
@@ -232,7 +246,7 @@ module FacebookAds
|
|
232
246
|
# @return [Fixnum] Hash code
|
233
247
|
def hash
|
234
248
|
[
|
235
|
-
event_name, event_time, event_source_url, opt_out, event_id, user_data, custom_data,
|
249
|
+
event_name, event_time, event_source_url, opt_out, event_id, user_data, custom_data, app_data,
|
236
250
|
data_processing_options, data_processing_options_country, data_processing_options_state,
|
237
251
|
action_source,
|
238
252
|
].hash
|
@@ -261,6 +275,9 @@ module FacebookAds
|
|
261
275
|
unless custom_data.nil?
|
262
276
|
hash['custom_data'] = custom_data.to_s
|
263
277
|
end
|
278
|
+
unless app_data.nil?
|
279
|
+
hash['app_data'] = app_data.to_s
|
280
|
+
end
|
264
281
|
unless data_processing_options.nil?
|
265
282
|
hash['data_processing_options'] = data_processing_options.to_s
|
266
283
|
end
|
@@ -301,6 +318,9 @@ module FacebookAds
|
|
301
318
|
unless custom_data.nil?
|
302
319
|
hash['custom_data'] = custom_data.normalize
|
303
320
|
end
|
321
|
+
unless app_data.nil?
|
322
|
+
hash['app_data'] = app_data.normalize
|
323
|
+
end
|
304
324
|
unless data_processing_options.nil?
|
305
325
|
hash['data_processing_options'] = data_processing_options
|
306
326
|
end
|
@@ -0,0 +1,344 @@
|
|
1
|
+
# Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
|
4
|
+
# copy, modify, and distribute this software in source code or binary form for use
|
5
|
+
# in connection with the web services and APIs provided by Facebook.
|
6
|
+
#
|
7
|
+
# As with any software that integrates with the Facebook platform, your use of
|
8
|
+
# this software is subject to the Facebook Platform Policy
|
9
|
+
# [http://developers.facebook.com/policy/]. This copyright notice shall be
|
10
|
+
# included in all copies or substantial portions of the software.
|
11
|
+
#
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
14
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
15
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
16
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
17
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
|
+
|
19
|
+
|
20
|
+
module FacebookAds
|
21
|
+
module ServerSide
|
22
|
+
# ExtendedDeviceInfo, such as screen width and height. This parameter is an array and values are separated by commas.
|
23
|
+
class ExtendedDeviceInfo
|
24
|
+
|
25
|
+
attr_accessor :ext_info_version,
|
26
|
+
:app_package_name,
|
27
|
+
:short_version,
|
28
|
+
:long_version,
|
29
|
+
:os_version,
|
30
|
+
:device_model_name,
|
31
|
+
:locale,
|
32
|
+
:timezone_abbreviation,
|
33
|
+
:carrier,
|
34
|
+
:screen_width,
|
35
|
+
:screen_height,
|
36
|
+
:screen_density,
|
37
|
+
:cpu_core_count,
|
38
|
+
:total_disk_space_gb,
|
39
|
+
:free_disk_space_gb,
|
40
|
+
:device_time_zone
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [String] ext_info_version
|
44
|
+
# @param [String] app_package_name
|
45
|
+
# @param [String] short_version
|
46
|
+
# @param [String] long_version
|
47
|
+
# @param [String] os_version
|
48
|
+
# @param [String] device_model_name
|
49
|
+
# @param [String] locale
|
50
|
+
# @param [String] timezone_abbreviation
|
51
|
+
# @param [String] carrier
|
52
|
+
# @param [String] screen_width
|
53
|
+
# @param [String] screen_height
|
54
|
+
# @param [String] screen_density
|
55
|
+
# @param [String] cpu_core_count
|
56
|
+
# @param [String] total_disk_space_gb
|
57
|
+
# @param [String] free_disk_space_gb
|
58
|
+
# @param [String] device_time_zone
|
59
|
+
def initialize(ext_info_version: nil, app_package_name: nil, short_version: nil, long_version: nil, os_version: nil, device_model_name: nil, locale: nil, timezone_abbreviation: nil,
|
60
|
+
carrier: nil, screen_width: nil, screen_height: nil, screen_density: nil, cpu_core_count: nil, total_disk_space_gb: nil, free_disk_space_gb: nil, device_time_zone: nil)
|
61
|
+
unless ext_info_version.nil?
|
62
|
+
self.ext_info_version = String(ext_info_version)
|
63
|
+
end
|
64
|
+
unless app_package_name.nil?
|
65
|
+
self.app_package_name = String(app_package_name)
|
66
|
+
end
|
67
|
+
unless short_version.nil?
|
68
|
+
self.short_version = String(short_version)
|
69
|
+
end
|
70
|
+
unless long_version.nil?
|
71
|
+
self.long_version = String(long_version)
|
72
|
+
end
|
73
|
+
unless os_version.nil?
|
74
|
+
self.os_version = String(os_version)
|
75
|
+
end
|
76
|
+
unless device_model_name.nil?
|
77
|
+
self.device_model_name = String(device_model_name)
|
78
|
+
end
|
79
|
+
unless locale.nil?
|
80
|
+
self.locale = String(locale)
|
81
|
+
end
|
82
|
+
unless timezone_abbreviation.nil?
|
83
|
+
self.timezone_abbreviation = String(timezone_abbreviation)
|
84
|
+
end
|
85
|
+
unless carrier.nil?
|
86
|
+
self.carrier = String(carrier)
|
87
|
+
end
|
88
|
+
unless screen_width.nil?
|
89
|
+
self.screen_width = String(screen_width)
|
90
|
+
end
|
91
|
+
unless screen_height.nil?
|
92
|
+
self.screen_height = String(screen_height)
|
93
|
+
end
|
94
|
+
unless screen_density.nil?
|
95
|
+
self.screen_density = String(screen_density)
|
96
|
+
end
|
97
|
+
unless cpu_core_count.nil?
|
98
|
+
self.cpu_core_count = String(cpu_core_count)
|
99
|
+
end
|
100
|
+
unless total_disk_space_gb.nil?
|
101
|
+
self.total_disk_space_gb = String(total_disk_space_gb)
|
102
|
+
end
|
103
|
+
unless free_disk_space_gb.nil?
|
104
|
+
self.free_disk_space_gb = String(free_disk_space_gb)
|
105
|
+
end
|
106
|
+
unless device_time_zone.nil?
|
107
|
+
self.device_time_zone = String(device_time_zone)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# build the object using the input hash
|
112
|
+
# @param [Hash] attributes attributes in the form of hash
|
113
|
+
def build(attributes = {})
|
114
|
+
return unless attributes.is_a?(Hash)
|
115
|
+
|
116
|
+
# convert string to symbol for hash key
|
117
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
118
|
+
|
119
|
+
if attributes.has_key?(:'ext_info_version')
|
120
|
+
self.ext_info_version = attributes[:'ext_info_version']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.has_key?(:'app_package_name')
|
124
|
+
self.app_package_name = attributes[:'app_package_name']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.has_key?(:'short_version')
|
128
|
+
self.short_version = attributes[:'short_version']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.has_key?(:'long_version')
|
132
|
+
self.long_version = attributes[:'long_version']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.has_key?(:'os_version')
|
136
|
+
self.os_version = attributes[:'os_version']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.has_key?(:'device_model_name')
|
140
|
+
self.device_model_name = attributes[:'device_model_name']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.has_key?(:'locale')
|
144
|
+
self.locale = attributes[:'locale']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.has_key?(:'timezone_abbreviation')
|
148
|
+
self.timezone_abbreviation = attributes[:'timezone_abbreviation']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'carrier')
|
152
|
+
self.carrier = attributes[:'carrier']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.has_key?(:'screen_width')
|
156
|
+
self.screen_width = attributes[:'screen_width']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.has_key?(:'screen_height')
|
160
|
+
self.screen_height = attributes[:'screen_height']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'screen_density')
|
164
|
+
self.screen_density = attributes[:'screen_density']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'cpu_core_count')
|
168
|
+
self.cpu_core_count = attributes[:'cpu_core_count']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'total_disk_space_gb')
|
172
|
+
self.total_disk_space_gb = attributes[:'total_disk_space_gb']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'free_disk_space_gb')
|
176
|
+
self.free_disk_space_gb = attributes[:'free_disk_space_gb']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'device_time_zone')
|
180
|
+
self.device_time_zone = attributes[:'device_time_zone']
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
|
185
|
+
# Checks equality by comparing each attribute.
|
186
|
+
def ==(o)
|
187
|
+
return self.class == o.class &&
|
188
|
+
ext_info_version == o.ext_info_version &&
|
189
|
+
app_package_name == o.app_package_name &&
|
190
|
+
short_version == o.short_version &&
|
191
|
+
long_version == o.long_version &&
|
192
|
+
os_version == o.os_version &&
|
193
|
+
device_model_name == o.device_model_name &&
|
194
|
+
locale == o.locale &&
|
195
|
+
timezone_abbreviation == o.timezone_abbreviation &&
|
196
|
+
carrier == o.carrier &&
|
197
|
+
screen_width == o.screen_width &&
|
198
|
+
screen_height == o.screen_height &&
|
199
|
+
screen_density == o.screen_density &&
|
200
|
+
cpu_core_count == o.cpu_core_count &&
|
201
|
+
total_disk_space_gb == o.total_disk_space_gb &&
|
202
|
+
free_disk_space_gb == o.free_disk_space_gb &&
|
203
|
+
device_time_zone == o.device_time_zone
|
204
|
+
end
|
205
|
+
|
206
|
+
# @see the `==` method
|
207
|
+
def eql?(o)
|
208
|
+
self == o
|
209
|
+
end
|
210
|
+
|
211
|
+
# Calculates hash code according to all attributes.
|
212
|
+
# @return [Fixnum] Hash code
|
213
|
+
def hash
|
214
|
+
[
|
215
|
+
ext_info_version,
|
216
|
+
app_package_name,
|
217
|
+
short_version,
|
218
|
+
long_version,
|
219
|
+
os_version,
|
220
|
+
device_model_name,
|
221
|
+
locale,
|
222
|
+
timezone_abbreviation,
|
223
|
+
carrier,
|
224
|
+
screen_width,
|
225
|
+
screen_height,
|
226
|
+
screen_density,
|
227
|
+
cpu_core_count,
|
228
|
+
total_disk_space_gb,
|
229
|
+
free_disk_space_gb,
|
230
|
+
device_time_zone
|
231
|
+
].hash
|
232
|
+
end
|
233
|
+
|
234
|
+
# Returns the string representation of the object
|
235
|
+
# @return [String] String presentation of the object
|
236
|
+
def to_s
|
237
|
+
hash = {}
|
238
|
+
unless ext_info_version.nil?
|
239
|
+
hash['ext_info_version'] = ext_info_version
|
240
|
+
end
|
241
|
+
unless app_package_name.nil?
|
242
|
+
hash['app_package_name'] = app_package_name
|
243
|
+
end
|
244
|
+
unless short_version.nil?
|
245
|
+
hash['short_version'] = short_version
|
246
|
+
end
|
247
|
+
unless long_version.nil?
|
248
|
+
hash['long_version'] = long_version
|
249
|
+
end
|
250
|
+
unless os_version.nil?
|
251
|
+
hash['os_version'] = os_version
|
252
|
+
end
|
253
|
+
unless device_model_name.nil?
|
254
|
+
hash['device_model_name'] = device_model_name
|
255
|
+
end
|
256
|
+
unless locale.nil?
|
257
|
+
hash['locale'] = locale
|
258
|
+
end
|
259
|
+
unless timezone_abbreviation.nil?
|
260
|
+
hash['timezone_abbreviation'] = timezone_abbreviation
|
261
|
+
end
|
262
|
+
unless carrier.nil?
|
263
|
+
hash['carrier'] = carrier
|
264
|
+
end
|
265
|
+
unless screen_width.nil?
|
266
|
+
hash['screen_width'] = screen_width
|
267
|
+
end
|
268
|
+
unless screen_height.nil?
|
269
|
+
hash['screen_height'] = screen_height
|
270
|
+
end
|
271
|
+
unless screen_density.nil?
|
272
|
+
hash['screen_density'] = screen_density
|
273
|
+
end
|
274
|
+
unless cpu_core_count.nil?
|
275
|
+
hash['cpu_core_count'] = cpu_core_count
|
276
|
+
end
|
277
|
+
unless total_disk_space_gb.nil?
|
278
|
+
hash['total_disk_space_gb'] = total_disk_space_gb
|
279
|
+
end
|
280
|
+
unless free_disk_space_gb.nil?
|
281
|
+
hash['free_disk_space_gb'] = free_disk_space_gb
|
282
|
+
end
|
283
|
+
unless device_time_zone.nil?
|
284
|
+
hash['device_time_zone'] = device_time_zone
|
285
|
+
end
|
286
|
+
hash.to_s
|
287
|
+
end
|
288
|
+
|
289
|
+
# Normalize input fields to server request format.
|
290
|
+
def normalize
|
291
|
+
ext_info_array = []
|
292
|
+
unless ext_info_version.nil?
|
293
|
+
ext_info_array.push(ext_info_version)
|
294
|
+
end
|
295
|
+
unless app_package_name.nil?
|
296
|
+
ext_info_array.push(app_package_name)
|
297
|
+
end
|
298
|
+
unless short_version.nil?
|
299
|
+
ext_info_array.push(short_version)
|
300
|
+
end
|
301
|
+
unless long_version.nil?
|
302
|
+
ext_info_array.push(long_version)
|
303
|
+
end
|
304
|
+
unless os_version.nil?
|
305
|
+
ext_info_array.push(os_version)
|
306
|
+
end
|
307
|
+
unless device_model_name.nil?
|
308
|
+
ext_info_array.push(device_model_name)
|
309
|
+
end
|
310
|
+
unless locale.nil?
|
311
|
+
ext_info_array.push(locale)
|
312
|
+
end
|
313
|
+
unless timezone_abbreviation.nil?
|
314
|
+
ext_info_array.push(timezone_abbreviation)
|
315
|
+
end
|
316
|
+
unless carrier.nil?
|
317
|
+
ext_info_array.push(carrier)
|
318
|
+
end
|
319
|
+
unless screen_width.nil?
|
320
|
+
ext_info_array.push(screen_width)
|
321
|
+
end
|
322
|
+
unless screen_height.nil?
|
323
|
+
ext_info_array.push(screen_height)
|
324
|
+
end
|
325
|
+
unless screen_density.nil?
|
326
|
+
ext_info_array.push(screen_density)
|
327
|
+
end
|
328
|
+
unless cpu_core_count.nil?
|
329
|
+
ext_info_array.push(cpu_core_count)
|
330
|
+
end
|
331
|
+
unless total_disk_space_gb.nil?
|
332
|
+
ext_info_array.push(total_disk_space_gb)
|
333
|
+
end
|
334
|
+
unless free_disk_space_gb.nil?
|
335
|
+
ext_info_array.push(free_disk_space_gb)
|
336
|
+
end
|
337
|
+
unless device_time_zone.nil?
|
338
|
+
ext_info_array.push(device_time_zone)
|
339
|
+
end
|
340
|
+
ext_info_array
|
341
|
+
end
|
342
|
+
end
|
343
|
+
end
|
344
|
+
end
|
@@ -216,6 +216,27 @@ module FacebookAds
|
|
216
216
|
# The date of birth year.
|
217
217
|
attr_accessor :doby
|
218
218
|
|
219
|
+
# Your Install ID. This field represents unique application installation instances.
|
220
|
+
attr_accessor :anon_ids
|
221
|
+
|
222
|
+
def anon_id
|
223
|
+
@anon_ids ? @anon_ids[0] : nil
|
224
|
+
end
|
225
|
+
def anon_id=(anon_id)
|
226
|
+
@anon_ids = [anon_id]
|
227
|
+
end
|
228
|
+
|
229
|
+
# Your mobile advertiser ID, the advertising ID from an Android device or the Advertising Identifier (IDFA) from an Apple device.
|
230
|
+
attr_accessor :madids
|
231
|
+
|
232
|
+
def madid
|
233
|
+
@madids ? @madids[0] : nil
|
234
|
+
end
|
235
|
+
def madid=(madid)
|
236
|
+
@madids = [madid]
|
237
|
+
end
|
238
|
+
|
239
|
+
|
219
240
|
#UserData is a set of identifiers Facebook can use for targeted attribution
|
220
241
|
# @param [String] email
|
221
242
|
# @param [Array<String>] emails
|
@@ -251,13 +272,17 @@ module FacebookAds
|
|
251
272
|
# @param [String] dobd
|
252
273
|
# @param [String] dobm
|
253
274
|
# @param [String] doby
|
275
|
+
# @param [String] anon_id
|
276
|
+
# @param [Array<String>] anon_ids
|
277
|
+
# @param [String] madid
|
278
|
+
# @param [Array<String>] madids
|
254
279
|
def initialize(email: nil, emails: nil, phone: nil, phones: nil, gender: nil, genders: nil,
|
255
280
|
date_of_birth: nil, dates_of_birth: nil, last_name: nil, last_names: nil,
|
256
281
|
first_name: nil, first_names: nil, city: nil, cities: nil, state: nil, states: nil,
|
257
282
|
country_code: nil, country_codes: nil, zip_code: nil, zip_codes: nil,
|
258
283
|
external_id: nil, external_ids: nil, client_ip_address: nil,
|
259
284
|
client_user_agent: nil, fbc: nil, fbp: nil, subscription_id: nil, lead_id: nil,
|
260
|
-
f5first: nil, f5last: nil, fi: nil, dobd: nil, dobm: nil, doby: nil)
|
285
|
+
f5first: nil, f5last: nil, fi: nil, dobd: nil, dobm: nil, doby: nil, anon_id: nil, anon_ids: nil, madid:nil, madids: nil)
|
261
286
|
validate_constructor_values(emails, email, 'emails', 'email')
|
262
287
|
validate_constructor_values(phones, phone, 'phones', 'phone')
|
263
288
|
validate_constructor_values(genders, gender, 'genders', 'gender')
|
@@ -372,6 +397,18 @@ module FacebookAds
|
|
372
397
|
unless doby.nil?
|
373
398
|
self.doby = doby
|
374
399
|
end
|
400
|
+
unless anon_id.nil?
|
401
|
+
self.anon_id = anon_id
|
402
|
+
end
|
403
|
+
unless anon_ids.nil?
|
404
|
+
self.anon_ids = anon_ids
|
405
|
+
end
|
406
|
+
unless madid.nil?
|
407
|
+
self.madid = madid
|
408
|
+
end
|
409
|
+
unless madids.nil?
|
410
|
+
self.madids = madids
|
411
|
+
end
|
375
412
|
end
|
376
413
|
|
377
414
|
# build the object using the input hash
|
@@ -491,6 +528,18 @@ module FacebookAds
|
|
491
528
|
if attributes.has_key?(:'doby')
|
492
529
|
self.doby = attributes[:'doby']
|
493
530
|
end
|
531
|
+
|
532
|
+
if attributes.has_key?(:'anon_ids')
|
533
|
+
self.anon_ids = attributes[:'anon_ids']
|
534
|
+
elsif attributes.has_key?(:'anon_id')
|
535
|
+
self.anon_ids = [attributes[:'anon_id']]
|
536
|
+
end
|
537
|
+
|
538
|
+
if attributes.has_key?(:'madids')
|
539
|
+
self.madids = attributes[:'madids']
|
540
|
+
elsif attributes.has_key?(:'madid')
|
541
|
+
self.madids = [attributes[:'madid']]
|
542
|
+
end
|
494
543
|
end
|
495
544
|
|
496
545
|
# Checks equality by comparing each attribute.
|
@@ -519,7 +568,9 @@ module FacebookAds
|
|
519
568
|
fi == o.fi &&
|
520
569
|
dobd == o.dobd &&
|
521
570
|
dobm == o.dobm &&
|
522
|
-
doby == o.doby
|
571
|
+
doby == o.doby &&
|
572
|
+
anon_ids == o.anon_ids &&
|
573
|
+
madids == o.madids
|
523
574
|
end
|
524
575
|
|
525
576
|
# @see the `==` method
|
@@ -554,6 +605,8 @@ module FacebookAds
|
|
554
605
|
dobd,
|
555
606
|
dobm,
|
556
607
|
doby,
|
608
|
+
anon_ids,
|
609
|
+
madids
|
557
610
|
].hash
|
558
611
|
|
559
612
|
end
|
@@ -631,6 +684,12 @@ module FacebookAds
|
|
631
684
|
unless doby.nil?
|
632
685
|
hash['doby'] = doby
|
633
686
|
end
|
687
|
+
unless anon_ids.nil?
|
688
|
+
hash['anon_ids'] = anon_ids
|
689
|
+
end
|
690
|
+
unless madids.nil?
|
691
|
+
hash['madids'] = madids
|
692
|
+
end
|
634
693
|
hash.to_s
|
635
694
|
end
|
636
695
|
|
@@ -707,6 +766,12 @@ module FacebookAds
|
|
707
766
|
unless doby.nil?
|
708
767
|
hash['doby'] = FacebookAds::ServerSide::Util.normalize(doby, 'doby')
|
709
768
|
end
|
769
|
+
unless anon_id.nil?
|
770
|
+
hash['anon_id'] = anon_ids
|
771
|
+
end
|
772
|
+
unless madid.nil?
|
773
|
+
hash['madid'] = madids
|
774
|
+
end
|
710
775
|
hash.select{|k, v| !v.nil?}
|
711
776
|
end
|
712
777
|
|
data/lib/facebook_ads/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: facebookbusiness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.0.
|
4
|
+
version: 0.16.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Facebook
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -616,6 +616,7 @@ files:
|
|
616
616
|
- lib/facebook_ads/ad_objects/saved_message_response.rb
|
617
617
|
- lib/facebook_ads/ad_objects/security_settings.rb
|
618
618
|
- lib/facebook_ads/ad_objects/server_side/action_source.rb
|
619
|
+
- lib/facebook_ads/ad_objects/server_side/app_data.rb
|
619
620
|
- lib/facebook_ads/ad_objects/server_side/batch_processor.rb
|
620
621
|
- lib/facebook_ads/ad_objects/server_side/content.rb
|
621
622
|
- lib/facebook_ads/ad_objects/server_side/custom_data.rb
|
@@ -624,6 +625,7 @@ files:
|
|
624
625
|
- lib/facebook_ads/ad_objects/server_side/event_request.rb
|
625
626
|
- lib/facebook_ads/ad_objects/server_side/event_request_async.rb
|
626
627
|
- lib/facebook_ads/ad_objects/server_side/event_response.rb
|
628
|
+
- lib/facebook_ads/ad_objects/server_side/extended_device_info.rb
|
627
629
|
- lib/facebook_ads/ad_objects/server_side/http_method.rb
|
628
630
|
- lib/facebook_ads/ad_objects/server_side/http_service_interface.rb
|
629
631
|
- lib/facebook_ads/ad_objects/server_side/http_util.rb
|