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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a8b57aa6a3d5a7920de9caffda7ee930334ae2d5f2c2570312c21c6719afd0a
4
- data.tar.gz: 235b97aa3b3cf62d45f599d1fcce73c56bdf9e8055c3573874edb3a1dca1ba9e
3
+ metadata.gz: 4b58ac91ab147e3eaa2a07ea8d3df8d597c4a62286973f61e99a16cec4e8a6df
4
+ data.tar.gz: ad87b4111a188ea5ed7f7a7958d69e808d87c5d065a384c89597ed922bcea308
5
5
  SHA512:
6
- metadata.gz: 697a904549ec2db1cd0db509ce662858cecde4caa92f37676da6fa8f0e2d5ab884c1b7a3047412ba8562a8951e1e4c2f095cc64a5185998fcbcc889ec1abc8c3
7
- data.tar.gz: c7cc2faf27059e148c996c958c046ae6ef1bbdea9cdba9e218241eec8eef9893bfae526f55cbd9e42f966dab23a23c73c53e6d223a4b1da5548799e58c28c4a0
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.0
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-06 00:00:00.000000000 Z
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.4.12
70
+ rubygems_version: 3.5.9
70
71
  signing_key:
71
72
  specification_version: 4
72
73
  summary: PayRex Ruby