jamm 1.0.5 → 1.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
  SHA256:
3
- metadata.gz: 7ff167592a3b265fac5fec78cb2fc81b03319980f24caff65db16742fb24536e
4
- data.tar.gz: b1de9712252cd6d60452c07e589f2e4558e66d8bc3fecb12e59ac00c9f8fac71
3
+ metadata.gz: 67a005360ecff410ceb64358b46d0891942242b32900a89d0a787719e5c227e3
4
+ data.tar.gz: 355eb570822c3c2999382a2ed21ce993dab9a0db127863c362fa2f511056018d
5
5
  SHA512:
6
- metadata.gz: c1437d7d975ee4a3f2d9f39910c15f7864f98e93d5b1addac74f8abdd9a4e2f14e49fdc86b2236a267d95a35b6be86118f0928957cdd8b4178379ca04d8788bf
7
- data.tar.gz: 82b03ecc2a5ebae9e7c1756a00080f45df9637951910295891825463a74645a0fe14ed3457685f35faf3d7b6e801754dd32d65e181a00e214d299f1ab66faa18
6
+ metadata.gz: 3afbed3c6e3bc5d09c5f32490eb7566f924bb009515a67de77669c6241dd09df686cf171e598605df6e731b720387a08a4354ce347dc68d43cd7b923c0fefe24
7
+ data.tar.gz: 457261620fcde3c9875274015eca3098c61367ec79759fbc621de99bb7c79fb4530a94f718fe6c5f6ed99f6f804a22c492062b7904a0a3890ad2be7402772412
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jamm (1.0.5)
4
+ jamm (1.0.8)
5
5
  rest-client (~> 2.0)
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
@@ -19,9 +19,7 @@ GEM
19
19
  domain_name (0.6.20240107)
20
20
  ethon (0.16.0)
21
21
  ffi (>= 1.15.0)
22
- ffi (1.17.0-aarch64-linux-gnu)
23
- ffi (1.17.0-arm64-darwin)
24
- ffi (1.17.0-x86_64-linux-gnu)
22
+ ffi (1.17.0)
25
23
  hashdiff (1.1.0)
26
24
  http-accept (1.7.0)
27
25
  http-cookie (1.0.5)
data/lib/jamm/customer.rb CHANGED
@@ -10,19 +10,17 @@ module Jamm
10
10
  def self.get(customer:)
11
11
  Jamm::CustomerApi.new(Jamm::Client.handler).get customer
12
12
  rescue Jamm::ApiError => e
13
- puts e
13
+ return nil if e.code == 404
14
+
15
+ raise
14
16
  end
15
17
 
16
18
  def self.update(**params)
17
19
  Jamm::CustomerApi.new(Jamm::Client.handler).update(params[:id], params)
18
- rescue Jamm::ApiError => e
19
- puts e
20
20
  end
21
21
 
22
22
  def self.delete(customer:)
23
23
  Jamm::CustomerApi.new(Jamm::Client.handler).delete customer
24
- rescue Jamm::ApiError => e
25
- puts e
26
24
  end
27
25
  end
28
26
  end
data/lib/jamm/payment.rb CHANGED
@@ -10,30 +10,18 @@ module Jamm
10
10
  def self.contract_with_charge(**params)
11
11
  request = Jamm::CreateContractWithChargeRequest.new(params)
12
12
 
13
- begin
14
- Jamm::PaymentApi.new(Jamm::Client.handler).create_contract_with_charge(request)
15
- rescue Jamm::ApiError => e
16
- puts e
17
- end
13
+ Jamm::PaymentApi.new(Jamm::Client.handler).create_contract_with_charge(request)
18
14
  end
19
15
 
20
16
  def self.get_contract(contract:)
21
- begin
22
- Jamm::PaymentApi.new(Jamm::Client.handler).get_contract(contract)
23
- rescue Jamm::ApiError => e
24
- puts e
25
- end
17
+ Jamm::PaymentApi.new(Jamm::Client.handler).get_contract(contract)
26
18
  end
27
19
 
28
20
  def self.add_charge(**params)
29
21
  request = Jamm::AddChargeRequest.new(params)
30
22
 
31
- begin
32
- p = Jamm::PaymentApi.new(Jamm::Client.handler)
33
- p.add_charge(request)
34
- rescue Jamm::ApiError => e
35
- puts e
36
- end
23
+ p = Jamm::PaymentApi.new(Jamm::Client.handler)
24
+ p.add_charge(request)
37
25
  end
38
26
  end
39
27
  end
data/lib/jamm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jamm
4
- VERSION = '1.0.5'
4
+ VERSION = '1.0.8'
5
5
  end
data/lib/jamm.rb CHANGED
@@ -44,7 +44,7 @@ module Jamm
44
44
  openapi.config.host = 'api.jamm-pay.jp'
45
45
 
46
46
  # Debugger mode, uncomment when needed
47
- # when 'develop'
47
+ # when 'local'
48
48
  # self.oauth_base = "https://merchant-identity.#{env}.jamm-pay.jp"
49
49
 
50
50
  # self.openapi = Jamm::ApiClient.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jamm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-01 00:00:00.000000000 Z
11
+ date: 2024-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client