credova 0.1.5 → 0.1.6

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: 7428c4495d5e03267bbb1de03e2a9dd694d53565c532615a67b25dbf7f9e4f79
4
- data.tar.gz: 9bf35883b051da324c613a5b356d37f97792ff309f8494b04fb5aeb8181d880c
3
+ metadata.gz: 80073fe97fd984aba48ec683796abcfa4368b1f280f49975b7df847e497fa1b4
4
+ data.tar.gz: 7ba35135084aaf83bd2e1c18d4add4d6333d3785fcb27aa1ee55dc152abe0e1d
5
5
  SHA512:
6
- metadata.gz: 2cce5588a6522318014f0e41615be085eeda2331e447eb8278a3cd4d332b6b5e773265508ac43f64a67ea70ba3b79f4a496fee5c462077c887614fa838cfcb85
7
- data.tar.gz: c8c8335d4bdc806a46626c9cd0f87bb15a0114052ac05acb863825797a664fb641370842d425b8a480d518e0c588766722a3b3b6ec89fd06ffae127aa7b46f95
6
+ metadata.gz: 90b51a53419f064bf8af40fe2c06e68d5451b3d3a8bbdb126f6276134a9ea6dcdfb3db0d4d3d3f244f6387ee4e2011161a58ff181c6e189eebd3ecaccd1d32ee
7
+ data.tar.gz: 5bfed31a7c3909bb610b4c13f68aa1d8ac25fa830712a71a0bb0bffce0d00dee51d4c238154459592503f33cc87d4c47e7ab5cdb964c5ec7c30e0351496ac8fb
data/lib/credova/api.rb CHANGED
@@ -29,6 +29,8 @@ module Credova
29
29
  uri = URI(request.path)
30
30
  request.body = data.is_a?(Hash) ? data.to_json : data
31
31
 
32
+ puts "\n-\nREQUEST_BODY_DATA: #{request.body.inspect}\n-\n"
33
+
32
34
  response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
33
35
  http.request(request)
34
36
  end
@@ -30,7 +30,7 @@ module Credova
30
30
  @client = client
31
31
  end
32
32
 
33
- def self.create(application_data, callback_url = nil)
33
+ def create(application_data, callback_url = nil)
34
34
  requires!(application_data, CREATE_ATTRS[:required])
35
35
 
36
36
  endpoint = ENDPOINTS[:create]
@@ -46,7 +46,7 @@ module Credova
46
46
  post_request(endpoint, application_data, headers)
47
47
  end
48
48
 
49
- def self.check_status_by_public_id(public_id)
49
+ def check_status_by_public_id(public_id)
50
50
  endpoint = ENDPOINTS[:check_status_by_public_id] % public_id
51
51
 
52
52
  get_request(endpoint, auth_header(@client.access_token))
@@ -58,7 +58,7 @@ module Credova
58
58
  get_request(endpoint, auth_header(@client.access_token))
59
59
  end
60
60
 
61
- def self.set_delivery_information(public_id, delivery_data)
61
+ def set_delivery_information(public_id, delivery_data)
62
62
  requires!(delivery_data, SET_DELIVERY_INFORMATION_ATTRS[:required])
63
63
 
64
64
  endpoint = ENDPOINTS[:set_delivery_information] % public_id
@@ -72,13 +72,13 @@ module Credova
72
72
  post_request(endpoint, delivery_data, headers)
73
73
  end
74
74
 
75
- def self.request_return(public_id)
75
+ def request_return(public_id)
76
76
  endpoint = ENDPOINTS[:request_return] % public_id
77
77
 
78
78
  post_request(endpoint, {}, auth_header(@client.access_token))
79
79
  end
80
80
 
81
- def self.upload_invoice(public_id, invoice_url)
81
+ def upload_invoice(public_id, invoice_url)
82
82
  endpoint = ENDPOINTS[:upload_invoice] % public_id
83
83
  data = { form_data: ['file=@', invoice_url, '; type=application/', extract_file_extension(invoice_url)].join }
84
84
  headers = [
@@ -1,3 +1,3 @@
1
1
  module Credova
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: credova
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Dill