omise 0.8.0 → 0.9.0

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: 9abe1a4a8a9399c57f4e58786fce81fd2ed38f2ddeead5ff9627a31e60aa914b
4
- data.tar.gz: bb8a391d081182e8137d2f6d946dbb7addd455f2f474fe09ed841c8f5fcaa570
3
+ metadata.gz: f6fa5f8ff2f6003fbfd564ef0637f2bc5ae24e67628672f9fbc9658f540b8bd7
4
+ data.tar.gz: 76083fa0668ca4ff0dac37973089b60ea2912dcc44cbe51ef61ab1a051061df1
5
5
  SHA512:
6
- metadata.gz: 943b4939ec9f1921d9b82f321d09de30b74ac7c0e8280b6db1574898850809a67d320756102b73ed9d8733f1cf1957eccbc5595bf088d15481ac238e396bd90d
7
- data.tar.gz: 30a76786b30c05720a989d88e35063f6ea88a4fa1c79ed6de95b66f978ab7da0898bb993ab9f199f3a2ad9ce7fdd2c03deb41d8ff17c328abddbae5370466ab5
6
+ metadata.gz: 3ff7c7296b4e7e85e4f57353eb5f75d3cdf5582c4dca2dec27779f9b017220f57eaa19bfed7a1740b2e0d1f9e62415ccaced75ee7b2ed2103c269d5e82ccc4b6
7
+ data.tar.gz: e14d47fc61f6bc5348437e7deff4feade6abd8e93d0ad074bb3aa88ec3d64d4f191d0e4fb99676e52de62d2340dd6925250dad51eec8747b27f8dfc153a8eece
@@ -10,6 +10,7 @@ require "omise/dispute"
10
10
  require "omise/document"
11
11
  require "omise/event"
12
12
  require "omise/forex"
13
+ require "omise/integration"
13
14
  require "omise/link"
14
15
  require "omise/occurrence"
15
16
  require "omise/recipient"
@@ -7,7 +7,7 @@ module Omise
7
7
  class << self
8
8
  attr_accessor :api_url, :vault_url, :api_version, :resource, :user_agent_suffix
9
9
 
10
- attr_writer :secret_api_key, :public_api_key
10
+ attr_writer :secret_api_key, :public_api_key, :app_key
11
11
 
12
12
  def secret_api_key
13
13
  get_key :secret_api_key
@@ -17,6 +17,10 @@ module Omise
17
17
  get_key :public_api_key
18
18
  end
19
19
 
20
+ def app_key
21
+ get_key :app_key
22
+ end
23
+
20
24
  # Backward compatibility with old API Keys naming conventions
21
25
  #
22
26
  # Will be removed in 1.0
@@ -0,0 +1,16 @@
1
+ require "omise/object"
2
+
3
+ module Omise
4
+ class Integration < OmiseObject
5
+ self.endpoint = "/integrations"
6
+
7
+ def self.retrieve(id, attributes = {})
8
+ new resource(location(id), attributes).get(attributes)
9
+ end
10
+
11
+ def self.resource_key
12
+ Omise.app_key
13
+ end
14
+
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module Omise
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
@@ -0,0 +1,12 @@
1
+ {
2
+ "object": "integration",
3
+ "id": "integration_test_5h24qlv37qyx537p1ub",
4
+ "kind": "shopify",
5
+ "created": "2019-08-29T10:19:19Z",
6
+ "public_key": "pkey_test_5bfvlxufuuqkrhmzfj1",
7
+ "secret_key": "skey_test_5hw809m30rlnp4but0m",
8
+ "data": {
9
+ "account_id": "integration_test_5h24qlv37qyx537p1ub",
10
+ "secret": "e4de752bf06483e4949263928757b137"
11
+ }
12
+ }
@@ -0,0 +1,13 @@
1
+ require "support"
2
+
3
+ class TestIntegration < Omise::Test
4
+ setup do
5
+ @integration = Omise::Integration.retrieve("integration_test_5h24qlv37qyx537p1ub")
6
+ end
7
+
8
+ def test_that_we_can_retrieve_an_integration
9
+ assert_instance_of Omise::Integration, @integration
10
+ assert_equal "integration_test_5h24qlv37qyx537p1ub", @integration.id
11
+ end
12
+
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Clart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-04 00:00:00.000000000 Z
11
+ date: 2019-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -131,6 +131,7 @@ files:
131
131
  - lib/omise/event.rb
132
132
  - lib/omise/forex.rb
133
133
  - lib/omise/http_logger.rb
134
+ - lib/omise/integration.rb
134
135
  - lib/omise/link.rb
135
136
  - lib/omise/list.rb
136
137
  - lib/omise/object.rb
@@ -199,6 +200,7 @@ files:
199
200
  - test/fixtures/api.omise.co/events-get.json
200
201
  - test/fixtures/api.omise.co/events/evnt_test_52cin5n9bb6lytxduh9-get.json
201
202
  - test/fixtures/api.omise.co/forex/usd-get.json
203
+ - test/fixtures/api.omise.co/integrations/integration_test_5h24qlv37qyx537p1ub.json
202
204
  - test/fixtures/api.omise.co/links-get.json
203
205
  - test/fixtures/api.omise.co/links-post.json
204
206
  - test/fixtures/api.omise.co/links/link_test_55pcclmznvrv9lc7r9s-get.json
@@ -241,6 +243,7 @@ files:
241
243
  - test/omise/test_event.rb
242
244
  - test/omise/test_forex.rb
243
245
  - test/omise/test_http_logger.rb
246
+ - test/omise/test_integration.rb
244
247
  - test/omise/test_link.rb
245
248
  - test/omise/test_list.rb
246
249
  - test/omise/test_occurrence.rb
@@ -326,6 +329,7 @@ test_files:
326
329
  - test/fixtures/api.omise.co/events-get.json
327
330
  - test/fixtures/api.omise.co/events/evnt_test_52cin5n9bb6lytxduh9-get.json
328
331
  - test/fixtures/api.omise.co/forex/usd-get.json
332
+ - test/fixtures/api.omise.co/integrations/integration_test_5h24qlv37qyx537p1ub.json
329
333
  - test/fixtures/api.omise.co/links-get.json
330
334
  - test/fixtures/api.omise.co/links-post.json
331
335
  - test/fixtures/api.omise.co/links/link_test_55pcclmznvrv9lc7r9s-get.json
@@ -368,6 +372,7 @@ test_files:
368
372
  - test/omise/test_event.rb
369
373
  - test/omise/test_forex.rb
370
374
  - test/omise/test_http_logger.rb
375
+ - test/omise/test_integration.rb
371
376
  - test/omise/test_link.rb
372
377
  - test/omise/test_list.rb
373
378
  - test/omise/test_occurrence.rb