bing-ads 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07de1d1b77a390e2dbcf751a26ebd3d19ef24967
4
- data.tar.gz: 209b2b9ad7bf5ff642140d5e95751ee98e63c873
3
+ metadata.gz: bc31748b139decf28fde91e23bf470f2074cdf58
4
+ data.tar.gz: 6bb1b477c35b26f665b29a9d293e524ad41b24ce
5
5
  SHA512:
6
- metadata.gz: df9e01c278b7ef1c8ae34bd81370651f33179f33f779cb8db04322654b248cf527cddf6db8c13eb91f979a0dba265a2022fdd11def50937fa11ca79a21f583f9
7
- data.tar.gz: 75a678422263eb8e8b8a5065e1eade82c9e4cbaad6f2b92e1374fcd4967cb56fe8f1d2d538190228f4d434283200d6865a1b9571f1f8f2c0454b8c229b782d45
6
+ metadata.gz: 6ae2cae5856504d061d40f7f584c333ecb2709668e324430dd97dc579d109cfe892723d04fbff208c1d4fd1afe8087af5d51484ac9a8a36ab02e68351b9a0019
7
+ data.tar.gz: 19e819791660d49b09686e2d06c2930ed4155e5d2fec351542a98a352e95a9535cbe10a980e85eece7b5aa0c4b4337f53664f8ef0f59d28c21e875825beac758
@@ -6,7 +6,11 @@ module Bing
6
6
  NAMESPACE_IDENTIFIER = :v11
7
7
 
8
8
  def self.constants
9
- Persey.config
9
+ @_config || fail('Error loading bing ads gem')
10
+ end
11
+
12
+ def self.constants=(config)
13
+ @_config = config
10
14
  end
11
15
  end
12
16
  end
@@ -21,6 +21,8 @@ module Bing
21
21
  source :yaml, wsdl_path, :wsdl
22
22
  env :default
23
23
  end
24
+
25
+ Bing::Ads::API::V11.constants = Persey.config
24
26
  end
25
27
  end
26
28
  end
@@ -16,6 +16,17 @@ module Bing
16
16
  [response_body[:campaigns][:campaign]].flatten.compact
17
17
  end
18
18
 
19
+ def get_campaigns_by_ids(account_id, campaign_ids)
20
+ account_id ||= @account_id
21
+ payload = {
22
+ account_id: account_id,
23
+ campaign_ids: { 'ins1:long' => campaign_ids }
24
+ }
25
+ response = call(:get_campaigns_by_ids, payload)
26
+ response_body = response_body(response, __method__)
27
+ [response_body[:campaigns][:campaign]].flatten.compact
28
+ end
29
+
19
30
  def add_campaigns(account_id, campaigns)
20
31
  validate_limits!(:campaign, :add, campaigns)
21
32
  campaigns = campaigns.map { |campaign| prepare_campaign(campaign) }
@@ -251,7 +262,6 @@ module Bing
251
262
  # TODO get_budgets_by_ids
252
263
  # TODO get_campaign_criterions_by_ids
253
264
  # TODO get_campaign_ids_by_budget_ids
254
- # TODO get_campaigns_by_ids
255
265
  # TODO get_campaign_sizes_by_account_id
256
266
  # TODO get_config_value
257
267
  # TODO get_conversion_goals_by_ids
@@ -12,7 +12,7 @@ module Bing
12
12
  def get_accounts_info(customer_id = @customer_id, only_parent_accounts = false)
13
13
  payload = {
14
14
  customer_id: customer_id,
15
- only_parent_accounts: only_parent_accounts
15
+ only_parent_accounts: (only_parent_accounts == true).to_s
16
16
  }
17
17
  response = call(:get_accounts_info, payload.compact)
18
18
  response_body = response_body(response, __method__)
@@ -1,5 +1,5 @@
1
1
  module Bing
2
2
  module Ads
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bing-ads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - oss92
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-16 00:00:00.000000000 Z
11
+ date: 2017-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon