dnb-direct-ruby 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7ceb486fb5488f553e8061470459928a85ba619
4
- data.tar.gz: c40f1df0713c644e02c2d0b78202b84d45cde7f7
3
+ metadata.gz: 1cc16645cf90cd64cd59ada8e706954ca61180e6
4
+ data.tar.gz: a3081c70721094e3bd599a3715225dd2f80f885d
5
5
  SHA512:
6
- metadata.gz: 601558a1fd8a0535762f5c040743161d304ce163a66810cdea8abe3a5dab6594231e7c7b980d01e2ed1795110926ed6855d2cee640bbae0ce7e0f3e1e0e98f9d
7
- data.tar.gz: 933093b237d2ad9ebaaf1ec7dfe46c9dc462cdb4ba4c908fdcd2bc427691a53c7bf72f139903f36458377d123d8f8d2552b691712636b7652592bb95c22671c3
6
+ metadata.gz: ba84c20ae23a11cbc3b88483d9b4ce77669c3e737acaeaf8aa143d68ff97b93de5bf2bda84e166b52fc042f8dc9f3514e7f740b291fca362b51cc7b63455d15a
7
+ data.tar.gz: 227e12ad4fa618a26708acbdd3230ed11f29d4b2554cc1dfdb3548c4be368610234b24ca456891b1719e76c855709cac52d148e09b94d577e6b11a9982aa345d
@@ -1,24 +1,34 @@
1
1
  class DnB::Direct::Plus::Content
2
-
3
2
  # This service is the most efficient way to gain basic marketing information
4
3
  # about an existing customer or potential prospect such as business name,
5
4
  # address, D&B® D-U-N-S® Number, phone and trade style. Includes business
6
5
  # intelligence such as senior executive name, activities, sales, number of
7
6
  # employees and owners.
8
7
  def self.profile_with_linkage(params = {})
9
- start = Time.now
10
- puts "== Started profile_with_linkage at #{start}" if $LOG_DNB
8
+ start = Time.now
9
+ puts "== Started profile_with_linkage at #{start}" if $LOG_DNB
11
10
  response = DnB::Direct::Plus.connection.get do |req|
12
11
  req.url "/v1/data/duns/#{params[:duns]}?productId=cmplnk&versionId=v1"
13
12
  req.headers[:authorization] = "Bearer #{DnB::Direct::Plus.api_token}"
14
13
  end
15
14
  puts "== Completed in #{Time.now - start}s" if $LOG_DNB
16
15
  org = DnB::Direct::Plus::Mappings::Organization.extract_single(response.body, :read)
17
- org.payload = response.body if (!org.nil? && org.respond_to?(:payload))
16
+ org.payload = response.body if !org.nil? && org.respond_to?(:payload)
18
17
  org
19
18
  end # def self.profile_with_linkage
20
19
 
21
-
20
+ # Converts the object into textual markup given a specific `format`
21
+ # (defaults to `:html`)
22
+ #
23
+ # == Parameters:
24
+ # format::
25
+ # A Symbol declaring the format to convert the object to. This
26
+ # can be `:text` or `:html`.
27
+ #
28
+ # == Returns:
29
+ # A string representing the object in a specified
30
+ # format.
31
+ #
22
32
  def self.plus_executives(params = {})
23
33
  response = DnB::Direct::Plus.connection.get do |req|
24
34
  req.url "/v1/data/duns/#{params[:duns]}?productId=cmpelk&versionId=v1"
@@ -27,5 +37,4 @@ class DnB::Direct::Plus::Content
27
37
 
28
38
  JSON.parse(response.body)
29
39
  end # def self.plus_executives
30
-
31
40
  end # class
@@ -1,5 +1,5 @@
1
1
  module DnB
2
2
  module Direct
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnb-direct-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Ihaia
@@ -137,7 +137,6 @@ extra_rdoc_files: []
137
137
  files:
138
138
  - ".gitignore"
139
139
  - ".ruby-version"
140
- - ".travis.yml"
141
140
  - CODE_OF_CONDUCT.md
142
141
  - Gemfile
143
142
  - LICENSE.txt
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.0
5
- before_install: gem install bundler -v 1.13.6