checkout_sdk 1.1.3 → 1.1.4

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: fe4967d92854672d3668f97b925b4d66e4ceb1bf08374ce054766596fe2b0181
4
- data.tar.gz: 9ba27b9aea9e2eda47755455da5770383b3fa7ec9892c49dc68b81d8b680ff34
3
+ metadata.gz: 614d4fcde0357737a39ce3468a80f424074e274ad012208e46286c09bda84ded
4
+ data.tar.gz: 70c2915a4de35657359cbef87805249766e7ce88caad1806b3e71f1b3a7b71a9
5
5
  SHA512:
6
- metadata.gz: 82e3fbe3f10193ee8655553b58596fd6821d1b52dc1789e895daedb9f818c43b28a27a5db5c245703046ac24a402a3d5b8ec36efcd2019e02ea0ff3174394038
7
- data.tar.gz: ba39851f661ef0885e35f8b2cd94025d358ce4ecaad015c8e14f43bbe97f04c9a62004f0620b1e2523744cb3b2117748563e3d2f717d0de4c1ba98886fbdd7a4
6
+ metadata.gz: f06299d70b3b3a0c629689124dcdd09a7f2b16d15b7f966a0c43b5e1031c0c37d1f5bd8815b7857522cf46d18ad084edba3aa432b936977a9fd11b466b75f552
7
+ data.tar.gz: 1e487e77197073878b170db9fcee2488b0955a48161a784ca356ff84245f270af5177b496602f777888181dbcebff61ae417206565c5314d63b79e3d0c999bed
@@ -37,6 +37,8 @@ module CheckoutSdk
37
37
  # @return [CheckoutSdk::Metadata::MetadataClient]
38
38
  # @!attribute financial
39
39
  # @return [CheckoutSdk::Financial::FinancialClient]
40
+ # @!attribute issuing
41
+ # @return [CheckoutSdk::Issuing::IssuingClient]
40
42
  class CheckoutApi
41
43
  attr_reader :customers,
42
44
  :disputes,
@@ -55,7 +57,8 @@ module CheckoutSdk
55
57
  :balances,
56
58
  :transfers,
57
59
  :metadata,
58
- :financial
60
+ :financial,
61
+ :issuing
59
62
 
60
63
  # @param [CheckoutConfiguration] configuration
61
64
  def initialize(configuration)
@@ -78,6 +81,7 @@ module CheckoutSdk
78
81
  @transfers = CheckoutSdk::Transfers::TransfersClient.new(transfers_client(configuration), configuration)
79
82
  @metadata = CheckoutSdk::Metadata::MetadataClient.new api_client, configuration
80
83
  @financial = CheckoutSdk::Financial::FinancialClient.new api_client, configuration
84
+ @issuing = CheckoutSdk::Issuing::IssuingClient.new api_client, configuration
81
85
  end
82
86
 
83
87
  private
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'checkout_sdk/issuing/issuing_client'
@@ -0,0 +1,166 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Issuing
5
+ class IssuingClient < Client
6
+ ISSUING = 'issuing'
7
+ CARDHOLDERS = 'cardholders'
8
+ CARDS = 'cards'
9
+ THREE_DS = '3ds-enrollment'
10
+ ACTIVATE = 'activate'
11
+ CREDENTIALS = 'credentials'
12
+ REVOKE = 'revoke'
13
+ SUSPEND = 'suspend'
14
+ CONTROLS = 'controls'
15
+ SIMULATE = 'simulate'
16
+ AUTHORIZATIONS = 'authorizations'
17
+ PRESENTMENTS = 'presentments'
18
+ REVERSALS = 'reversals'
19
+ private_constant :ISSUING,
20
+ :CARDHOLDERS,
21
+ :CARDS,
22
+ :THREE_DS,
23
+ :ACTIVATE,
24
+ :CREDENTIALS,
25
+ :REVOKE,
26
+ :SUSPEND,
27
+ :CONTROLS,
28
+ :SIMULATE,
29
+ :AUTHORIZATIONS,
30
+ :PRESENTMENTS,
31
+ :REVERSALS
32
+
33
+ # @param [ApiClient] api_client
34
+ # @param [CheckoutConfiguration] configuration
35
+ def initialize(api_client, configuration)
36
+ super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH
37
+ end
38
+
39
+ # @param [Hash] cardholder_request
40
+ def create_cardholder(cardholder_request)
41
+ api_client.invoke_post(build_path(ISSUING, CARDHOLDERS), sdk_authorization, cardholder_request)
42
+ end
43
+
44
+ # @param [String] cardholder_id
45
+ def get_cardholder(cardholder_id)
46
+ api_client.invoke_get(build_path(ISSUING, CARDHOLDERS, cardholder_id), sdk_authorization)
47
+ end
48
+
49
+ # @param [String] cardholder_id
50
+ def get_cardholder_cards(cardholder_id)
51
+ api_client.invoke_get(build_path(ISSUING, CARDHOLDERS, cardholder_id, CARDS), sdk_authorization)
52
+ end
53
+
54
+ # @param [Hash] card_request
55
+ def create_card(card_request)
56
+ api_client.invoke_post(build_path(ISSUING, CARDS), sdk_authorization, card_request)
57
+ end
58
+
59
+ # @param [String] card_id
60
+ def get_card_details(card_id)
61
+ api_client.invoke_get(build_path(ISSUING, CARDS, card_id), sdk_authorization)
62
+ end
63
+
64
+ # @param [String] card_id
65
+ # @param [Hash] three_ds_request
66
+ def enroll_three_ds(card_id, three_ds_request)
67
+ api_client.invoke_post(build_path(ISSUING, CARDS, card_id, THREE_DS), sdk_authorization, three_ds_request)
68
+ end
69
+
70
+ # @param [String] card_id
71
+ # @param [Hash] three_ds_request
72
+ def update_three_ds_enrollment(card_id, three_ds_request)
73
+ api_client.invoke_patch(build_path(ISSUING, CARDS, card_id, THREE_DS), sdk_authorization, three_ds_request)
74
+ end
75
+
76
+ # @param [String] card_id
77
+ def get_card_three_ds_details(card_id)
78
+ api_client.invoke_get(build_path(ISSUING, CARDS, card_id, THREE_DS), sdk_authorization)
79
+ end
80
+
81
+ # @param [String] card_id
82
+ def activate_card(card_id)
83
+ api_client.invoke_post(build_path(ISSUING, CARDS, card_id, ACTIVATE), sdk_authorization)
84
+ end
85
+
86
+ # @param [String] card_id
87
+ # @param [Hash] query
88
+ def get_card_credentials(card_id, query)
89
+ api_client.invoke_get(build_path(ISSUING, CARDS, card_id, CREDENTIALS), sdk_authorization, query)
90
+ end
91
+
92
+ # @param [String] card_id
93
+ # @param [Hash] revoke_request
94
+ def revoke_card(card_id, revoke_request)
95
+ api_client.invoke_post(build_path(ISSUING, CARDS, card_id, REVOKE), sdk_authorization, revoke_request)
96
+ end
97
+
98
+ # @param [String] card_id
99
+ # @param [Hash] suspend_request
100
+ def suspend_card(card_id, suspend_request)
101
+ api_client.invoke_post(build_path(ISSUING, CARDS, card_id, SUSPEND), sdk_authorization, suspend_request)
102
+ end
103
+
104
+ # @param [Hash] control_request
105
+ def create_control(control_request)
106
+ api_client.invoke_post(build_path(ISSUING, CONTROLS), sdk_authorization, control_request)
107
+ end
108
+
109
+ # @param [Hash] controls_query
110
+ def get_card_controls(controls_query)
111
+ api_client.invoke_get(build_path(ISSUING, CONTROLS), sdk_authorization, controls_query)
112
+ end
113
+
114
+ # @param [String] control_id
115
+ def get_card_control_details(control_id)
116
+ api_client.invoke_get(build_path(ISSUING, CONTROLS, control_id), sdk_authorization)
117
+ end
118
+
119
+ # @param [String] control_id
120
+ # @param [Hash] update_control_request
121
+ def update_card_control(control_id, update_control_request)
122
+ api_client.invoke_put(build_path(ISSUING, CONTROLS, control_id), sdk_authorization, update_control_request)
123
+ end
124
+
125
+ # @param [String] control_id
126
+ def remove_card_control(control_id)
127
+ api_client.invoke_delete(build_path(ISSUING, CONTROLS, control_id), sdk_authorization)
128
+ end
129
+
130
+ # @param [Hash] authorization_request
131
+ def simulate_authorization(authorization_request)
132
+ api_client.invoke_post(build_path(ISSUING, SIMULATE, AUTHORIZATIONS), sdk_authorization, authorization_request)
133
+ end
134
+
135
+ # @param [String] transaction_id
136
+ # @param [Hash] increment_request
137
+ def simulate_increment(transaction_id, increment_request)
138
+ api_client.invoke_post(
139
+ build_path(ISSUING, SIMULATE, AUTHORIZATIONS, transaction_id, AUTHORIZATIONS),
140
+ sdk_authorization,
141
+ increment_request
142
+ )
143
+ end
144
+
145
+ # @param [String] transaction_id
146
+ # @param [Hash] clearing_request
147
+ def simulate_clearing(transaction_id, clearing_request)
148
+ api_client.invoke_post(
149
+ build_path(ISSUING, SIMULATE, AUTHORIZATIONS, transaction_id, PRESENTMENTS),
150
+ sdk_authorization,
151
+ clearing_request
152
+ )
153
+ end
154
+
155
+ # @param [String] transaction_id
156
+ # @param [Hash] reversal_request
157
+ def simulate_reversal(transaction_id, reversal_request)
158
+ api_client.invoke_post(
159
+ build_path(ISSUING, SIMULATE, AUTHORIZATIONS, transaction_id, REVERSALS),
160
+ sdk_authorization,
161
+ reversal_request
162
+ )
163
+ end
164
+ end
165
+ end
166
+ end
@@ -43,5 +43,9 @@ module CheckoutSdk
43
43
  CARD_METADATA = 'vault:card-metadata'
44
44
  FINANCIAL_ACTIONS = 'financial-actions'
45
45
  FINANCIAL_ACTIONS_VIEW = 'financial-actions:view'
46
+ ISSUING_CLIENT = 'issuing:client'
47
+ ISSUING_CARD_MGMT = 'issuing:card-mgmt'
48
+ ISSUING_CONTROLS_READ = 'issuing:controls-read'
49
+ ISSUING_CONTROLS_WRITE = 'issuing:controls-write'
46
50
  end
47
51
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CheckoutSdk
4
- VERSION = '1.1.3'
4
+ VERSION = '1.1.4'
5
5
  end
data/lib/checkout_sdk.rb CHANGED
@@ -64,6 +64,7 @@ require 'checkout_sdk/balances/balances'
64
64
  require 'checkout_sdk/transfers/transfers'
65
65
  require 'checkout_sdk/metadata/metadata'
66
66
  require 'checkout_sdk/financial/financial'
67
+ require 'checkout_sdk/issuing/issuing'
67
68
 
68
69
  # Checkout modules (previous)
69
70
  require 'checkout_sdk/sources/sources'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkout_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Checkout
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-21 00:00:00.000000000 Z
11
+ date: 2023-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -243,6 +243,8 @@ files:
243
243
  - lib/checkout_sdk/instruments/update/update_instrument_bank_account.rb
244
244
  - lib/checkout_sdk/instruments/update/update_instrument_card.rb
245
245
  - lib/checkout_sdk/instruments/update/update_instrument_token.rb
246
+ - lib/checkout_sdk/issuing/issuing.rb
247
+ - lib/checkout_sdk/issuing/issuing_client.rb
246
248
  - lib/checkout_sdk/json_serializer.rb
247
249
  - lib/checkout_sdk/metadata/metadata.rb
248
250
  - lib/checkout_sdk/metadata/metadata_client.rb