facebookbusiness 0.7.0.2 → 0.7.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/lib/facebook_ads/ad_objects/ad_account.rb +5 -6
  3. data/lib/facebook_ads/ad_objects/ad_account_delivery_estimate.rb +1 -0
  4. data/lib/facebook_ads/ad_objects/ad_account_matched_search_applications_edge_data.rb +1 -0
  5. data/lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb +1 -0
  6. data/lib/facebook_ads/ad_objects/ad_activity.rb +7 -0
  7. data/lib/facebook_ads/ad_objects/ad_asset_feed_spec.rb +1 -0
  8. data/lib/facebook_ads/ad_objects/ad_campaign_activity.rb +2 -2
  9. data/lib/facebook_ads/ad_objects/ad_campaign_delivery_estimate.rb +1 -0
  10. data/lib/facebook_ads/ad_objects/ad_creative.rb +1 -0
  11. data/lib/facebook_ads/ad_objects/ad_creative_link_data_call_to_action.rb +1 -0
  12. data/lib/facebook_ads/ad_objects/ad_preview.rb +0 -1
  13. data/lib/facebook_ads/ad_objects/ad_set.rb +2 -0
  14. data/lib/facebook_ads/ad_objects/ad_study.rb +1 -0
  15. data/lib/facebook_ads/ad_objects/ad_video.rb +5 -27
  16. data/lib/facebook_ads/ad_objects/adgroup_placement_specific_review_feedback.rb +4 -0
  17. data/lib/facebook_ads/ad_objects/{ads_interest.rb → adoptable_pet.rb} +18 -5
  18. data/lib/facebook_ads/ad_objects/ads_insights.rb +4 -0
  19. data/lib/facebook_ads/ad_objects/application.rb +4 -0
  20. data/lib/facebook_ads/ad_objects/atlas_campaign.rb +2 -2
  21. data/lib/facebook_ads/ad_objects/business.rb +1 -121
  22. data/lib/facebook_ads/ad_objects/business_asset_group.rb +0 -3
  23. data/lib/facebook_ads/ad_objects/business_role_request.rb +5 -0
  24. data/lib/facebook_ads/ad_objects/business_user.rb +5 -0
  25. data/lib/facebook_ads/ad_objects/campaign.rb +257 -0
  26. data/lib/facebook_ads/ad_objects/commerce_merchant_settings.rb +8 -0
  27. data/lib/facebook_ads/ad_objects/event.rb +11 -0
  28. data/lib/facebook_ads/ad_objects/external_event_source.rb +1 -0
  29. data/lib/facebook_ads/ad_objects/group.rb +5 -0
  30. data/lib/facebook_ads/ad_objects/ig_media.rb +1 -0
  31. data/lib/facebook_ads/ad_objects/media_fingerprint.rb +0 -1
  32. data/lib/facebook_ads/ad_objects/page.rb +5 -2
  33. data/lib/facebook_ads/ad_objects/page_admin_note.rb +1 -0
  34. data/lib/facebook_ads/ad_objects/page_call_to_action.rb +3 -0
  35. data/lib/facebook_ads/ad_objects/page_change_proposal.rb +2 -0
  36. data/lib/facebook_ads/ad_objects/{brand_audience.rb → payment_subscription.rb} +23 -9
  37. data/lib/facebook_ads/ad_objects/post.rb +1 -1
  38. data/lib/facebook_ads/ad_objects/product_catalog.rb +2 -0
  39. data/lib/facebook_ads/ad_objects/product_feed.rb +1 -0
  40. data/lib/facebook_ads/ad_objects/product_set.rb +3 -0
  41. data/lib/facebook_ads/ad_objects/{user_influence.rb → product_set_metadata.rb} +4 -4
  42. data/lib/facebook_ads/ad_objects/profile.rb +1 -0
  43. data/lib/facebook_ads/ad_objects/profile_picture_source.rb +4 -0
  44. data/lib/facebook_ads/ad_objects/saved_audience.rb +1 -0
  45. data/lib/facebook_ads/ad_objects/server_side/content.rb +75 -13
  46. data/lib/facebook_ads/ad_objects/server_side/custom_data.rb +24 -6
  47. data/lib/facebook_ads/ad_objects/server_side/event_request.rb +80 -6
  48. data/lib/facebook_ads/ad_objects/server_side/user_data.rb +126 -17
  49. data/lib/facebook_ads/ad_objects/server_side/util.rb +204 -150
  50. data/lib/facebook_ads/ad_objects/system_user.rb +5 -0
  51. data/lib/facebook_ads/ad_objects/targeting.rb +1 -0
  52. data/lib/facebook_ads/ad_objects/{creative_asset_tag.rb → targeting_relaxation.rb} +2 -2
  53. data/lib/facebook_ads/ad_objects/third_party_measurement_report_dataset.rb +1 -0
  54. data/lib/facebook_ads/ad_objects/user.rb +8 -4
  55. data/lib/facebook_ads/ad_objects/user_taggable_friend.rb +1 -0
  56. data/lib/facebook_ads/ad_objects/{whats_app_business_profile.rb → work_meeting_link.rb} +3 -3
  57. data/lib/facebook_ads/version.rb +1 -1
  58. metadata +36 -16
  59. data/lib/facebook_ads/ad_objects/business_creative.rb +0 -50
  60. data/lib/facebook_ads/ad_objects/business_creative_folder.rb +0 -79
  61. data/lib/facebook_ads/ad_objects/business_creative_folder_sharing_agreement.rb +0 -46
  62. data/lib/facebook_ads/ad_objects/business_image.rb +0 -95
  63. data/lib/facebook_ads/ad_objects/client_transparency_status.rb +0 -40
  64. data/lib/facebook_ads/ad_objects/messenger_platform_referral.rb +0 -39
  65. data/lib/facebook_ads/ad_objects/streaming_reaction.rb +0 -51
@@ -30,6 +30,7 @@ module FacebookAds
30
30
  field :body, 'string'
31
31
  field :from, 'Page'
32
32
  field :id, 'string'
33
+ field :note_label, 'string'
33
34
  field :user, 'User'
34
35
  has_no_post
35
36
  has_no_delete
@@ -32,6 +32,7 @@ module FacebookAds
32
32
  "EMAIL",
33
33
  "FACEBOOK_APP",
34
34
  "FOLLOW",
35
+ "MARKETPLACE_INVENTORY_PAGE",
35
36
  "MESSENGER",
36
37
  "MINI_SHOP",
37
38
  "NONE",
@@ -46,6 +47,7 @@ module FacebookAds
46
47
  "EMAIL",
47
48
  "FACEBOOK_APP",
48
49
  "FOLLOW",
50
+ "MARKETPLACE_INVENTORY_PAGE",
49
51
  "MESSENGER",
50
52
  "MINI_SHOP",
51
53
  "NONE",
@@ -83,6 +85,7 @@ module FacebookAds
83
85
  "SHOP_NOW",
84
86
  "SHOP_ON_FACEBOOK",
85
87
  "SIGN_UP",
88
+ "VIEW_INVENTORY",
86
89
  "VIEW_SHOP",
87
90
  "VISIT_GROUP",
88
91
  "WATCH_NOW",
@@ -33,6 +33,8 @@ module FacebookAds
33
33
  field :id, 'string'
34
34
  field :proposed_value, 'string'
35
35
  field :upcoming_change_info, 'PageUpcomingChange'
36
+ has_no_get
37
+ has_no_post
36
38
  has_no_delete
37
39
 
38
40
  end
@@ -25,18 +25,32 @@ module FacebookAds
25
25
  # on github and we'll fix in our codegen framework. We'll not be able to accept
26
26
  # pull request for this class.
27
27
 
28
- class BrandAudience < AdObject
28
+ class PaymentSubscription < AdObject
29
29
 
30
- field :account, 'AdAccount'
31
- field :delivery_targeting, 'Targeting'
32
- field :description, 'string'
30
+ field :amount, 'string'
31
+ field :app_param_data, 'string'
32
+ field :application, 'Profile'
33
+ field :billing_period, 'string'
34
+ field :canceled_reason, 'string'
35
+ field :created_time, 'datetime'
36
+ field :currency, 'string'
33
37
  field :id, 'string'
34
- field :name, 'string'
35
- field :sentence_lines, { list: 'string' }
38
+ field :last_payment, 'string'
39
+ field :next_bill_time, 'datetime'
40
+ field :next_period_amount, 'string'
41
+ field :next_period_currency, 'string'
42
+ field :next_period_product, 'string'
43
+ field :payment_status, 'string'
44
+ field :pending_cancel, 'bool'
45
+ field :period_start_time, 'datetime'
46
+ field :product, 'string'
36
47
  field :status, 'string'
37
- field :targeting, 'Targeting'
38
- field :time_created, 'datetime'
39
- field :time_updated, 'datetime'
48
+ field :test, 'int'
49
+ field :trial_amount, 'string'
50
+ field :trial_currency, 'string'
51
+ field :trial_expiry_time, 'datetime'
52
+ field :updated_time, 'datetime'
53
+ field :user, 'Profile'
40
54
  has_no_post
41
55
  has_no_delete
42
56
 
@@ -178,7 +178,7 @@ module FacebookAds
178
178
  api.has_param :audience_id, 'string'
179
179
  api.has_param :bid_amount, 'int'
180
180
  api.has_param :budget, 'int'
181
- api.has_param :cta_type, { enum: %w{ADD_TO_CART APPLY_NOW BOOK_TRAVEL BUY BUY_NOW BUY_TICKETS CALL CALL_ME CONTACT CONTACT_US DONATE DONATE_NOW DOWNLOAD EVENT_RSVP FIND_A_GROUP FIND_YOUR_GROUPS FOLLOW_NEWS_STORYLINE FOLLOW_PAGE FOLLOW_USER GET_DIRECTIONS GET_OFFER GET_OFFER_VIEW GET_QUOTE GET_SHOWTIMES INSTALL_APP INSTALL_MOBILE_APP LEARN_MORE LIKE_PAGE LISTEN_MUSIC LISTEN_NOW MESSAGE_PAGE MOBILE_DOWNLOAD MOMENTS NO_BUTTON OPEN_LINK ORDER_NOW PAY_TO_ACCESS PLAY_GAME PURCHASE_GIFT_CARDS RECORD_NOW REQUEST_TIME SAY_THANKS SEE_MORE SELL_NOW SHARE SHOP_NOW SIGN_UP SOTTO_SUBSCRIBE SUBSCRIBE UPDATE_APP USE_APP USE_MOBILE_APP VIDEO_ANNOTATION VISIT_PAGES_FEED WATCH_MORE WATCH_VIDEO WHATSAPP_MESSAGE WOODHENGE_SUPPORT }}
181
+ api.has_param :cta_type, { enum: %w{ADD_TO_CART APPLY_NOW BOOK_TRAVEL BUY BUY_NOW BUY_TICKETS CALL CALL_ME CONTACT CONTACT_US DONATE DONATE_NOW DOWNLOAD EVENT_RSVP FIND_A_GROUP FIND_YOUR_GROUPS FOLLOW_NEWS_STORYLINE FOLLOW_PAGE FOLLOW_USER GET_DIRECTIONS GET_OFFER GET_OFFER_VIEW GET_QUOTE GET_SHOWTIMES INSTALL_APP INSTALL_MOBILE_APP LEARN_MORE LIKE_PAGE LISTEN_MUSIC LISTEN_NOW MESSAGE_PAGE MOBILE_DOWNLOAD MOMENTS NO_BUTTON OPEN_LINK ORDER_NOW PAY_TO_ACCESS PLAY_GAME PURCHASE_GIFT_CARDS RECORD_NOW REQUEST_TIME SAY_THANKS SEE_MORE SELL_NOW SEND_A_GIFT SHARE SHOP_NOW SIGN_UP SOTTO_SUBSCRIBE SUBSCRIBE UPDATE_APP USE_APP USE_MOBILE_APP VIDEO_ANNOTATION VISIT_PAGES_FEED WATCH_MORE WATCH_VIDEO WHATSAPP_MESSAGE WOODHENGE_SUPPORT }}
182
182
  api.has_param :currency, 'string'
183
183
  api.has_param :flow_id, 'string'
184
184
  api.has_param :placement, 'string'
@@ -27,6 +27,7 @@ module FacebookAds
27
27
 
28
28
  class ProductCatalog < AdObject
29
29
  VERTICAL = [
30
+ "adoptable_pets",
30
31
  "bookable",
31
32
  "commerce",
32
33
  "destinations",
@@ -295,6 +296,7 @@ module FacebookAds
295
296
  end
296
297
  edge.post 'ProductSet' do |api|
297
298
  api.has_param :filter, 'object'
299
+ api.has_param :metadata, 'hash'
298
300
  api.has_param :name, 'string'
299
301
  end
300
302
  end
@@ -63,6 +63,7 @@ module FacebookAds
63
63
  "MEDIA_TITLE",
64
64
  "OFFER",
65
65
  "PRODUCTS",
66
+ "TRANSACTABLE_ITEMS",
66
67
  "VEHICLES",
67
68
  "VEHICLE_OFFER",
68
69
  ]
@@ -30,9 +30,12 @@ module FacebookAds
30
30
  field :auto_creation_url, 'string'
31
31
  field :filter, 'string'
32
32
  field :id, 'string'
33
+ field :latest_metadata, 'ProductSetMetadata'
34
+ field :live_metadata, 'ProductSetMetadata'
33
35
  field :name, 'string'
34
36
  field :product_catalog, 'ProductCatalog'
35
37
  field :product_count, 'int'
38
+ field :metadata, 'hash'
36
39
 
37
40
  has_edge :automotive_models do |edge|
38
41
  edge.get 'AutomotiveModel' do |api|
@@ -25,11 +25,11 @@ module FacebookAds
25
25
  # on github and we'll fix in our codegen framework. We'll not be able to accept
26
26
  # pull request for this class.
27
27
 
28
- class UserInfluence < AdObject
28
+ class ProductSetMetadata < AdObject
29
29
 
30
- field :trust, 'string'
31
- field :trust_code, 'int'
32
- field :version, 'int'
30
+ field :cover_image_url, 'string'
31
+ field :description, 'string'
32
+ field :integrity_review_status, 'string'
33
33
  has_no_id
34
34
  has_no_get
35
35
  has_no_post
@@ -64,6 +64,7 @@ module FacebookAds
64
64
 
65
65
  has_edge :picture do |edge|
66
66
  edge.get 'ProfilePictureSource' do |api|
67
+ api.has_param :breaking_change, { enum: -> { ProfilePictureSource::BREAKING_CHANGE }}
67
68
  api.has_param :height, 'int'
68
69
  api.has_param :redirect, 'bool'
69
70
  api.has_param :type, { enum: -> { ProfilePictureSource::TYPE }}
@@ -32,6 +32,10 @@ module FacebookAds
32
32
  "thumbnail",
33
33
  ]
34
34
 
35
+ BREAKING_CHANGE = [
36
+ "PROFILE_PICTURE",
37
+ ]
38
+
35
39
 
36
40
  field :bottom, 'int'
37
41
  field :cache_key, 'string'
@@ -40,6 +40,7 @@ module FacebookAds
40
40
  field :time_created, 'datetime'
41
41
  field :time_updated, 'datetime'
42
42
  has_no_post
43
+ has_no_delete
43
44
 
44
45
  end
45
46
  end
@@ -22,20 +22,23 @@ module FacebookAds
22
22
  # Content object contains information about the products.
23
23
  class Content
24
24
 
25
- # Product Id
26
- attr_accessor :product_id
27
-
28
- # number of product
29
- attr_accessor :quantity
30
-
31
- # Item Price.
32
- attr_accessor :item_price
25
+ attr_accessor :product_id,
26
+ :quantity,
27
+ :item_price,
28
+ :title,
29
+ :description,
30
+ :brand,
31
+ :category
33
32
 
34
33
  # Initializes the object
35
34
  # @param [String] product_id
36
35
  # @param [Integer] quantity
37
36
  # @param [Float] item_price
38
- def initialize(product_id: nil, quantity: nil, item_price: nil)
37
+ # @param [String] title
38
+ # @param [String] description
39
+ # @param [String] brand
40
+ # @param [String] category
41
+ def initialize(product_id: nil, quantity: nil, item_price: nil, title: nil, description: nil, brand: nil, category: nil)
39
42
  unless product_id.nil?
40
43
  self.product_id = String(product_id)
41
44
  end
@@ -45,6 +48,18 @@ module FacebookAds
45
48
  unless item_price.nil?
46
49
  self.item_price = Float(item_price)
47
50
  end
51
+ unless title.nil?
52
+ self.title = String(title)
53
+ end
54
+ unless description.nil?
55
+ self.description = String(description)
56
+ end
57
+ unless brand.nil?
58
+ self.brand = String(brand)
59
+ end
60
+ unless category.nil?
61
+ self.category = String(category)
62
+ end
48
63
  end
49
64
 
50
65
  # build the object using the input hash
@@ -66,15 +81,34 @@ module FacebookAds
66
81
  if attributes.has_key?(:'item_price')
67
82
  self.item_price = attributes[:'item_price']
68
83
  end
84
+
85
+ if attributes.has_key?(:'title')
86
+ self.title = attributes[:'title']
87
+ end
88
+
89
+ if attributes.has_key?(:'description')
90
+ self.description = attributes[:'description']
91
+ end
92
+
93
+ if attributes.has_key?(:'brand')
94
+ self.brand = attributes[:'brand']
95
+ end
96
+
97
+ if attributes.has_key?(:'category')
98
+ self.category = attributes[:'category']
99
+ end
69
100
  end
70
101
 
71
102
  # Checks equality by comparing each attribute.
72
103
  def ==(o)
73
- return true if self.equal?(o)
74
- self.class == o.class &&
104
+ return self.class == o.class &&
75
105
  product_id == o.product_id &&
76
106
  quantity == o.quantity &&
77
- item_price == o.item_price
107
+ item_price == o.item_price &&
108
+ title == o.title &&
109
+ description == o.description &&
110
+ brand == o.brand &&
111
+ category == o.category
78
112
  end
79
113
 
80
114
  # @see the `==` method
@@ -88,7 +122,11 @@ module FacebookAds
88
122
  [
89
123
  product_id,
90
124
  quantity,
91
- item_price
125
+ item_price,
126
+ title,
127
+ description,
128
+ brand,
129
+ category
92
130
  ].hash
93
131
  end
94
132
 
@@ -106,6 +144,18 @@ module FacebookAds
106
144
  unless item_price.nil?
107
145
  hash['item_price'] = item_price
108
146
  end
147
+ unless title.nil?
148
+ hash['title'] = title
149
+ end
150
+ unless description.nil?
151
+ hash['description'] = description
152
+ end
153
+ unless brand.nil?
154
+ hash['brand'] = brand
155
+ end
156
+ unless category.nil?
157
+ hash['category'] = category
158
+ end
109
159
  hash.to_s
110
160
  end
111
161
 
@@ -121,6 +171,18 @@ module FacebookAds
121
171
  unless item_price.nil?
122
172
  hash['item_price'] = item_price
123
173
  end
174
+ unless title.nil?
175
+ hash['title'] = title
176
+ end
177
+ unless description.nil?
178
+ hash['description'] = description
179
+ end
180
+ unless brand.nil?
181
+ hash['brand'] = brand
182
+ end
183
+ unless category.nil?
184
+ hash['category'] = category
185
+ end
124
186
  hash
125
187
  end
126
188
  end
@@ -69,7 +69,11 @@ module FacebookAds
69
69
  # Use only with Search events. A search query made by a user.
70
70
  # Example: 'lettuce'.
71
71
  attr_accessor :search_string
72
-
72
+
73
+ # The item number.
74
+ # Example: 'item1234'.
75
+ attr_accessor :item_number
76
+
73
77
  # Custom Properties bag for storing other custom fields
74
78
  attr_accessor :custom_properties
75
79
 
@@ -86,6 +90,7 @@ module FacebookAds
86
90
  # @param [Integer] num_items
87
91
  # @param [String] status
88
92
  # @param [String] search_string
93
+ # @param [String] item_number
89
94
  # @param [String] custom_properties
90
95
  def initialize(value: nil,
91
96
  currency: nil,
@@ -99,6 +104,7 @@ module FacebookAds
99
104
  num_items: nil,
100
105
  status: nil,
101
106
  search_string: nil,
107
+ item_number: nil,
102
108
  custom_properties: {})
103
109
 
104
110
  unless value.nil?
@@ -137,6 +143,9 @@ module FacebookAds
137
143
  unless search_string.nil?
138
144
  self.search_string = search_string
139
145
  end
146
+ unless item_number.nil?
147
+ self.item_number = item_number
148
+ end
140
149
  unless custom_properties.nil?
141
150
  self.custom_properties = custom_properties
142
151
  end
@@ -203,6 +212,10 @@ module FacebookAds
203
212
  self.search_string = attributes[:'search_string']
204
213
  end
205
214
 
215
+ if attributes.has_key?(:'item_number')
216
+ self.item_number = attributes[:'item_number']
217
+ end
218
+
206
219
  if attributes.has_key?(:'custom_properties')
207
220
  self.custom_properties = attributes[:'custom_properties']
208
221
  end
@@ -224,6 +237,7 @@ module FacebookAds
224
237
  num_items == o.num_items &&
225
238
  status == o.status &&
226
239
  search_string == o.search_string &&
240
+ item_number == o.item_number &&
227
241
  custom_properties == o.custom_properties
228
242
  end
229
243
 
@@ -248,6 +262,7 @@ module FacebookAds
248
262
  num_items,
249
263
  status,
250
264
  search_string,
265
+ item_number,
251
266
  custom_properties
252
267
  ].hash
253
268
  end
@@ -294,23 +309,23 @@ module FacebookAds
294
309
  end
295
310
  unless custom_properties.nil?
296
311
  hash['custom_properties'] = custom_properties
297
- end
312
+ end
298
313
  hash.to_s
299
314
  end
300
315
 
301
316
  # Add other custom fields to custom properties.
302
317
  def add_custom_property(key, value)
303
- custom_properties[key] = value;
318
+ custom_properties[key] = value;
304
319
  end
305
320
 
306
321
  # Normalize input fields to server request format.
307
- def normalize
322
+ def normalize
308
323
  hash = {}
309
324
  unless value.nil?
310
325
  hash['value'] = value
311
326
  end
312
327
  unless currency.nil?
313
- hash['currency'] = FacebookAds::ServerSide::normalize(currency, 'currency')
328
+ hash['currency'] = FacebookAds::ServerSide::Util.normalize(currency, 'currency')
314
329
  end
315
330
  unless content_name.nil?
316
331
  hash['content_name'] = content_name
@@ -339,6 +354,9 @@ module FacebookAds
339
354
  unless search_string.nil?
340
355
  hash['search_string'] = search_string
341
356
  end
357
+ unless item_number.nil?
358
+ hash['item_number'] = item_number
359
+ end
342
360
 
343
361
  unless contents.nil?
344
362
  content_array = []
@@ -348,7 +366,7 @@ module FacebookAds
348
366
  hash['contents'] = content_array
349
367
  end
350
368
 
351
- hash.merge!(custom_properties) unless custom_properties.nil?
369
+ hash.merge!(custom_properties) unless custom_properties.nil?
352
370
  hash
353
371
  end
354
372
  end
@@ -39,11 +39,28 @@ module FacebookAds
39
39
  # Platform from which the event is sent e.g. wordpress
40
40
  attr_accessor :partner_agent
41
41
 
42
+ # Scope used to resolve extern_id or Third-party ID. Can be another data set or data partner ID.
43
+ attr_accessor :namespace_id
44
+
45
+ # Unique id used to denote the current set being uploaded.
46
+ attr_accessor :upload_id
47
+
48
+ # Tag string added to track your Offline event uploads.
49
+ attr_accessor :upload_tag
50
+
51
+ # The origin/source of data for the dataset to be uploaded.
52
+ attr_accessor :upload_source
53
+
42
54
  # @param [String] pixel_id
43
55
  # @param [Array(FacebookAds::ServerSide::Event)] events
44
56
  # @param [String] test_event_code
45
57
  # @param [String] partner_agent
46
- def initialize(pixel_id: nil, events: nil, test_event_code: nil, partner_agent: nil)
58
+ # @param [String] namespace_id
59
+ # @param [String] upload_id
60
+ # @param [String] upload_tag
61
+ # @param [String] upload_source
62
+ def initialize(pixel_id: nil, events: nil, test_event_code: nil, partner_agent: nil,
63
+ namespace_id: nil, upload_id: nil, upload_tag: nil, upload_source: nil)
47
64
  unless pixel_id.nil?
48
65
  self.pixel_id = pixel_id
49
66
  end
@@ -56,6 +73,18 @@ module FacebookAds
56
73
  unless partner_agent.nil?
57
74
  self.partner_agent = partner_agent
58
75
  end
76
+ unless namespace_id.nil?
77
+ self.namespace_id = namespace_id
78
+ end
79
+ unless upload_id.nil?
80
+ self.upload_id = upload_id
81
+ end
82
+ unless upload_tag.nil?
83
+ self.upload_tag = upload_tag
84
+ end
85
+ unless upload_source.nil?
86
+ self.upload_source = upload_source
87
+ end
59
88
  end
60
89
 
61
90
  # build the object using the input hash
@@ -83,6 +112,22 @@ module FacebookAds
83
112
  if attributes.has_key?(:'partner_agent')
84
113
  self.partner_agent = attributes[:'partner_agent']
85
114
  end
115
+
116
+ if attributes.has_key?(:'namespace_id')
117
+ self.namespace_id = attributes[:'namespace_id']
118
+ end
119
+
120
+ if attributes.has_key?(:'upload_id')
121
+ self.upload_id = attributes[:'upload_id']
122
+ end
123
+
124
+ if attributes.has_key?(:'upload_tag')
125
+ self.upload_tag = attributes[:'upload_tag']
126
+ end
127
+
128
+ if attributes.has_key?(:'upload_source')
129
+ self.upload_source = attributes[:'upload_source']
130
+ end
86
131
  end
87
132
 
88
133
  # Execute request
@@ -96,7 +141,11 @@ module FacebookAds
96
141
  {
97
142
  data: normalized_events,
98
143
  test_event_code: test_event_code,
99
- partner_agent: partner_agent
144
+ partner_agent: partner_agent,
145
+ namespace_id: namespace_id,
146
+ upload_id: upload_id,
147
+ upload_tag: upload_tag,
148
+ upload_source: upload_source,
100
149
  }
101
150
  )
102
151
  json_response_object = JSON.parse(JSON.generate(response), object_class: OpenStruct)
@@ -137,9 +186,14 @@ module FacebookAds
137
186
  def ==(o)
138
187
  return true if self.equal?(o)
139
188
  self.class == o.class &&
189
+ pixel_id == o.pixel_id &&
140
190
  events == o.events &&
141
- test_event_code == o.test_event_code
142
- partner_agent == o.partner_agent
191
+ test_event_code == o.test_event_code &&
192
+ partner_agent == o.partner_agent &&
193
+ namespace_id == o.namespace_id &&
194
+ upload_id == o.upload_id &&
195
+ upload_tag == o.upload_tag &&
196
+ upload_source == o.upload_source
143
197
  end
144
198
 
145
199
  # @see the `==` method
@@ -150,7 +204,16 @@ module FacebookAds
150
204
  # Calculates hash code according to all attributes.
151
205
  # @return [Fixnum] Hash code
152
206
  def hash
153
- [events, test_event_code, partner_agent].hash
207
+ [
208
+ pixel_id,
209
+ events,
210
+ test_event_code,
211
+ partner_agent,
212
+ namespace_id,
213
+ upload_id,
214
+ upload_tag,
215
+ upload_source,
216
+ ].hash
154
217
  end
155
218
 
156
219
  def to_s
@@ -167,9 +230,20 @@ module FacebookAds
167
230
  unless partner_agent.nil?
168
231
  hash['partner_agent'] = partner_agent
169
232
  end
233
+ unless namespace_id.nil?
234
+ hash['namespace_id'] = namespace_id
235
+ end
236
+ unless upload_id.nil?
237
+ hash['upload_id'] = upload_id
238
+ end
239
+ unless upload_tag.nil?
240
+ hash['upload_tag'] = upload_tag
241
+ end
242
+ unless upload_source.nil?
243
+ hash['upload_source'] = upload_source
244
+ end
170
245
  hash.to_s
171
246
  end
172
247
  end
173
248
  end
174
249
  end
175
-