credova 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 7084ae696e6c5359945ab0f2e256dd30c0684132cda5fe184eebb2746563f3f1
4
- data.tar.gz: 2c748b2ab2ce6e593d9ee011261e09c43e0599ff427afcf30e3c03c69e686662
3
+ metadata.gz: 802f8624e72cf6bfe98fefeb2e1e7aea81b4f8e3d4df53b435ab5f23c7d18f84
4
+ data.tar.gz: a28e668a1c724f952c36e815320827b6bb29729a91ce2868bfedf6d7efb3d83d
5
5
  SHA512:
6
- metadata.gz: bcf552f21d1e0ca8b1e9d5d2896b39dd2302894d568bccf0cc4afe3104872286208d1f89ce6ef7b0aa04194e73417aa88b205efa98590a03d6cc57f5d3c17ab1
7
- data.tar.gz: 0c12e3b8e95c5ac2a9bb80bfacf01e0735c06a08feacdd1f9f2bc32db8451916fbe63a01513d1de5f5252164e9a470d51db3770fe43b455ec2e0bd2810e905dd
6
+ metadata.gz: 3865a8d6b91f494d17f34509cfcb4e1485b23a7787fd00fc0a6a64e71b41abd722e48f73c1de1f3227eb7e39cec3bfe0b42b982876058d527971f9c91326151e
7
+ data.tar.gz: e83264ab2769fa18ff4a55471e72fdd361a954da23cf26fb95bdadd28eac6e4c44cd33e3537e04fe726cb2f029ca9afba7bfabba2138c08eb5dfc8b664ec1129
data/lib/credova/api.rb CHANGED
@@ -9,16 +9,6 @@ module Credova
9
9
 
10
10
  USER_AGENT = "CredovaRubyGem/#{Credova::VERSION}".freeze
11
11
 
12
- # def self.get_request(*args)
13
- # get_request(*args)
14
- # end
15
- #
16
- # def self.post_request(*args)
17
- # post_request(*args)
18
- # end
19
-
20
- # private
21
-
22
12
  def get_request(endpoint, headers = {})
23
13
  request = Net::HTTP::Get.new(request_url(endpoint))
24
14
 
@@ -21,7 +21,7 @@ module Credova
21
21
  @client = client
22
22
  end
23
23
 
24
- def create(callback_url, options = {})
24
+ def create(callback_url = nil, options = {})
25
25
  requires!(options, REQUIRED_CREATE_ATTRS)
26
26
 
27
27
  endpoint = ENDPOINTS[:create]
@@ -30,6 +30,8 @@ module Credova
30
30
  *content_type_header('application/json'),
31
31
  ].to_h
32
32
 
33
+ headers['Callback-Url'] = callback_url if callback_url.present?
34
+
33
35
  post_request(endpoint, options, headers)
34
36
  end
35
37
 
@@ -1,3 +1,3 @@
1
1
  module Credova
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: credova
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Dill
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-20 00:00:00.000000000 Z
11
+ date: 2019-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler