payrex-ruby 1.1.0 → 1.2.1
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 +4 -4
- data/lib/entities/billing_statement.rb +2 -0
- data/lib/entities/checkout_session.rb +2 -0
- data/lib/helpers/parameter.rb +22 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b58ac91ab147e3eaa2a07ea8d3df8d597c4a62286973f61e99a16cec4e8a6df
|
4
|
+
data.tar.gz: ad87b4111a188ea5ed7f7a7958d69e808d87c5d065a384c89597ed922bcea308
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4841fb702ea2c84f05f185d27a83f514fc30f069e6a236e084f398e20d33720031eed191d20391fbfdad81370c6dfc0335d2df2e8ad9285a58557c344ce37501
|
7
|
+
data.tar.gz: 65bd2c9b715649f59fe4af3816fde59dcd41e4c625b28ec33105f6e39b418bcf2b8ebb0b08ef9e1487d43c5663abd1ea1116132aa27e19ca64e3f898f4f2a870
|
@@ -3,6 +3,7 @@ module Payrex
|
|
3
3
|
class BillingStatement
|
4
4
|
attr_reader :id,
|
5
5
|
:amount,
|
6
|
+
:billing_details_collection,
|
6
7
|
:currency,
|
7
8
|
:customer_id,
|
8
9
|
:description,
|
@@ -26,6 +27,7 @@ module Payrex
|
|
26
27
|
|
27
28
|
@id = data["id"]
|
28
29
|
@amount = data["amount"]
|
30
|
+
@billing_details_collection = data["billing_details_collection"]
|
29
31
|
@currency = data["currency"]
|
30
32
|
@customer_id = data["customer_id"]
|
31
33
|
@description = data["description"]
|
@@ -2,6 +2,7 @@ module Payrex
|
|
2
2
|
module Entities
|
3
3
|
class CheckoutSession
|
4
4
|
attr_reader :id,
|
5
|
+
:billing_details_collection,
|
5
6
|
:customer_reference_id,
|
6
7
|
:client_secret,
|
7
8
|
:status,
|
@@ -24,6 +25,7 @@ module Payrex
|
|
24
25
|
data = api_resource.data
|
25
26
|
|
26
27
|
@id = data["id"]
|
28
|
+
@billing_details_collection = data["billing_details_collection"]
|
27
29
|
@customer_reference_id = data["customer_reference_id"]
|
28
30
|
@client_secret = data["client_secret"]
|
29
31
|
@status = data["status"]
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "cgi"
|
4
|
+
|
5
|
+
module Payrex
|
6
|
+
class Parameter
|
7
|
+
def self.encode(params, prefix = nil)
|
8
|
+
case params
|
9
|
+
when Array
|
10
|
+
params.map.with_index do |value, index|
|
11
|
+
encode(value, "#{prefix}[#{index}]")
|
12
|
+
end.join("&")
|
13
|
+
when Hash
|
14
|
+
params.map do |key, value|
|
15
|
+
encode(value, prefix ? "#{prefix}[#{key}]" : key)
|
16
|
+
end.join("&")
|
17
|
+
else
|
18
|
+
"#{CGI.escape(prefix.to_s)}=#{CGI.escape(params.to_s)}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: payrex-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PayRex
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: PayRex Ruby Library
|
14
14
|
email: support@payrexhq.com
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- lib/errors/resource_not_found_error.rb
|
36
36
|
- lib/errors/signature_invalid_error.rb
|
37
37
|
- lib/errors/value_unexpected_error.rb
|
38
|
+
- lib/helpers/parameter.rb
|
38
39
|
- lib/http_client.rb
|
39
40
|
- lib/payrex-ruby.rb
|
40
41
|
- lib/payrex_error.rb
|
@@ -66,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
67
|
- !ruby/object:Gem::Version
|
67
68
|
version: '0'
|
68
69
|
requirements: []
|
69
|
-
rubygems_version: 3.
|
70
|
+
rubygems_version: 3.5.9
|
70
71
|
signing_key:
|
71
72
|
specification_version: 4
|
72
73
|
summary: PayRex Ruby
|