checkout_sdk 1.0.2 → 1.0.3
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/.rubocop.yml +2 -1
- data/lib/checkout_sdk/accounts/accounts.rb +1 -0
- data/lib/checkout_sdk/accounts/accounts_client.rb +9 -0
- data/lib/checkout_sdk/accounts/update_payment_instrument_request.rb +14 -0
- data/lib/checkout_sdk/balances/balances_client.rb +1 -1
- data/lib/checkout_sdk/common/account_holder.rb +6 -0
- data/lib/checkout_sdk/common/payment_source_type.rb +3 -0
- data/lib/checkout_sdk/oauth_scopes.rb +2 -2
- data/lib/checkout_sdk/payments/payment_recipient.rb +4 -0
- data/lib/checkout_sdk/payments/payment_request.rb +4 -4
- data/lib/checkout_sdk/payments/payments.rb +5 -0
- data/lib/checkout_sdk/payments/processing_settings.rb +10 -1
- data/lib/checkout_sdk/payments/risk_request.rb +4 -1
- data/lib/checkout_sdk/payments/sender/individual_sender.rb +6 -3
- data/lib/checkout_sdk/payments/sender/sender_information.rb +41 -0
- data/lib/checkout_sdk/payments/source/apm/cv_connect_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/apm/illicado_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/apm/trustly_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/currency_account_source.rb +0 -4
- data/lib/checkout_sdk/payments/source/entity_source.rb +11 -0
- data/lib/checkout_sdk/payments/source/payout_source.rb +4 -1
- data/lib/checkout_sdk/payments/source/payout_source_type.rb +1 -0
- data/lib/checkout_sdk/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86b3e418596eba84f9d21cc8149e4030dd1fbae085ca44db519ab6ad11ce4121
|
4
|
+
data.tar.gz: d9d48a22ac629a07434d15da2299a8574d7e1a1571baaacb250ca14b3fb1bc75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cf7820ae7f37afa4630e1bebd9671b7d9d8eecd1cb3c736881e6bbd264cb4fafb043288fae10c57c66b544279b6b420510659c0414be1706d1c2c7aa283b52b
|
7
|
+
data.tar.gz: 1123a2c14c3ce44b66ef3943b11ba704de9fccf71971115899eff68643d81c89eda6efa1b2265ae8cf67110e502e7796d96ff115e80657a85ec895a739f70a55
|
data/.rubocop.yml
CHANGED
@@ -33,3 +33,4 @@ require 'checkout_sdk/accounts/instrument_details_faster_payments'
|
|
33
33
|
require 'checkout_sdk/accounts/instrument_details_sepa'
|
34
34
|
require 'checkout_sdk/accounts/payment_instrument_request'
|
35
35
|
require 'checkout_sdk/accounts/payment_instruments_query'
|
36
|
+
require 'checkout_sdk/accounts/update_payment_instrument_request'
|
@@ -67,6 +67,15 @@ module CheckoutSdk
|
|
67
67
|
sdk_authorization)
|
68
68
|
end
|
69
69
|
|
70
|
+
# @param [String] entity_id
|
71
|
+
# @param [String] instrument_id
|
72
|
+
# @param [UpdatePaymentInstrumentRequest] update_payment_instrument
|
73
|
+
def update_payment_instrument(entity_id, instrument_id, update_payment_instrument)
|
74
|
+
api_client.invoke_patch(build_path(ACCOUNTS, ENTITIES, entity_id, PAYMENT_INSTRUMENTS, instrument_id),
|
75
|
+
sdk_authorization,
|
76
|
+
update_payment_instrument)
|
77
|
+
end
|
78
|
+
|
70
79
|
# @param [String] entity_id
|
71
80
|
# @param [String] currency {CheckoutSdk::Common::Currency}
|
72
81
|
# @param [UpdateSchedule] update_schedule
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Accounts
|
5
|
+
# @!attribute label
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute default
|
8
|
+
# @return [TrueClass, FalseClass]
|
9
|
+
class UpdatePaymentInstrumentRequest
|
10
|
+
attr_accessor :label,
|
11
|
+
:default
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -9,7 +9,7 @@ module CheckoutSdk
|
|
9
9
|
# @param [ApiClient] api_client
|
10
10
|
# @param [CheckoutConfiguration] configuration
|
11
11
|
def initialize(api_client, configuration)
|
12
|
-
super(api_client, configuration, CheckoutSdk::AuthorizationType::
|
12
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
|
13
13
|
end
|
14
14
|
|
15
15
|
# @param [String] entity_id
|
@@ -4,8 +4,12 @@ module CheckoutSdk
|
|
4
4
|
module Common
|
5
5
|
# @!attribute type
|
6
6
|
# @return [String] {AccountHolderType}
|
7
|
+
# @!attribute title
|
8
|
+
# @return [String]
|
7
9
|
# @!attribute first_name
|
8
10
|
# @return [String]
|
11
|
+
# @!attribute middle_name
|
12
|
+
# @return [String]
|
9
13
|
# @!attribute last_name
|
10
14
|
# @return [String]
|
11
15
|
# @!attribute company_name
|
@@ -30,7 +34,9 @@ module CheckoutSdk
|
|
30
34
|
# @return [String]
|
31
35
|
class AccountHolder
|
32
36
|
attr_accessor :type,
|
37
|
+
:title,
|
33
38
|
:first_name,
|
39
|
+
:middle_name,
|
34
40
|
:last_name,
|
35
41
|
:company_name,
|
36
42
|
:tax_id,
|
@@ -38,8 +38,8 @@ module CheckoutSdk
|
|
38
38
|
MIDDLEWARE = 'middleware'
|
39
39
|
MIDDLEWARE_MERCHANTS_SECRET = 'middleware:merchants-secret'
|
40
40
|
MIDDLEWARE_MERCHANTS_PUBLIC = 'middleware:merchants-public'
|
41
|
-
|
42
|
-
|
41
|
+
REPORTS = 'reports'
|
42
|
+
REPORTS_VIEW = 'reports:view'
|
43
43
|
CARD_METADATA = 'vault:card-metadata'
|
44
44
|
end
|
45
45
|
end
|
@@ -6,7 +6,10 @@ module CheckoutSdk
|
|
6
6
|
# @return [String]
|
7
7
|
# @!attribute account_number
|
8
8
|
# @return [String]
|
9
|
+
# @!attribute address
|
10
|
+
# @return [CheckoutSdk::Common::Address]
|
9
11
|
# @!attribute zip
|
12
|
+
# @deprecated Please use {#CheckoutSdk::Common::Address.zip} instead
|
10
13
|
# @return [String]
|
11
14
|
# @!attribute first_name
|
12
15
|
# @return [String]
|
@@ -17,6 +20,7 @@ module CheckoutSdk
|
|
17
20
|
class PaymentRecipient
|
18
21
|
attr_accessor :dob,
|
19
22
|
:account_number,
|
23
|
+
:address,
|
20
24
|
:zip,
|
21
25
|
:first_name,
|
22
26
|
:last_name,
|
@@ -53,10 +53,10 @@ module CheckoutSdk
|
|
53
53
|
# @return [Array(CheckoutSdk::Common::AmountAllocations)]
|
54
54
|
# @!attribute processing
|
55
55
|
# @return [ProcessingSettings]
|
56
|
-
# @!attribute metadata
|
57
|
-
# @return [Hash{String => Object}]
|
58
56
|
# @!attribute items
|
59
57
|
# @return [Array(Product)]
|
58
|
+
# @!attribute metadata
|
59
|
+
# @return [Hash{String => Object}]
|
60
60
|
class PaymentRequest
|
61
61
|
attr_accessor :source,
|
62
62
|
:amount,
|
@@ -83,8 +83,8 @@ module CheckoutSdk
|
|
83
83
|
:marketplace,
|
84
84
|
:amount_allocations,
|
85
85
|
:processing,
|
86
|
-
:
|
87
|
-
:
|
86
|
+
:items,
|
87
|
+
:metadata
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
@@ -50,6 +50,7 @@ require 'checkout_sdk/payments/source/token_source'
|
|
50
50
|
require 'checkout_sdk/payments/source/provider_token_source'
|
51
51
|
require 'checkout_sdk/payments/source/bank_account_source'
|
52
52
|
require 'checkout_sdk/payments/source/customer_source'
|
53
|
+
require 'checkout_sdk/payments/source/entity_source'
|
53
54
|
require 'checkout_sdk/payments/source/payout_source_type'
|
54
55
|
require 'checkout_sdk/payments/source/currency_account_source'
|
55
56
|
require 'checkout_sdk/payments/source/id_source'
|
@@ -76,6 +77,9 @@ require 'checkout_sdk/payments/source/apm/alma_source'
|
|
76
77
|
require 'checkout_sdk/payments/source/apm/fawry_product'
|
77
78
|
require 'checkout_sdk/payments/source/apm/fawry_source'
|
78
79
|
require 'checkout_sdk/payments/source/apm/klarna_source'
|
80
|
+
require 'checkout_sdk/payments/source/apm/cv_connect_source'
|
81
|
+
require 'checkout_sdk/payments/source/apm/trustly_source'
|
82
|
+
require 'checkout_sdk/payments/source/apm/illicado_source'
|
79
83
|
|
80
84
|
# Sender
|
81
85
|
require 'checkout_sdk/payments/sender/sender'
|
@@ -86,6 +90,7 @@ require 'checkout_sdk/payments/sender/individual_sender'
|
|
86
90
|
require 'checkout_sdk/payments/sender/corporate_sender'
|
87
91
|
require 'checkout_sdk/payments/sender/instrument_sender'
|
88
92
|
require 'checkout_sdk/payments/sender/ticket'
|
93
|
+
require 'checkout_sdk/payments/sender/sender_information'
|
89
94
|
|
90
95
|
# Destination
|
91
96
|
require 'checkout_sdk/payments/destination/destination'
|
@@ -54,12 +54,18 @@ module CheckoutSdk
|
|
54
54
|
# @return [String] {CheckoutSdk::Common::Country}
|
55
55
|
# @!attribute custom_payment_method_ids
|
56
56
|
# @return [Array(String)]
|
57
|
+
# @!attribute merchant_callback_url
|
58
|
+
# @return [String]
|
57
59
|
# @!attribute shipping_delay
|
58
60
|
# @return [Integer]
|
59
61
|
# @!attribute shipping_info
|
60
62
|
# @return [Array(CheckoutSdk::Common::ShippingInfo)]
|
61
63
|
# @!attribute dlocal
|
62
64
|
# @return [DLocalProcessingSettings]
|
65
|
+
# @!attribute senderInformation
|
66
|
+
# @return [SenderInformation]
|
67
|
+
# @!attribute purpose
|
68
|
+
# @return [String]
|
63
69
|
class ProcessingSettings
|
64
70
|
attr_accessor :order_id,
|
65
71
|
:tax_amount,
|
@@ -87,9 +93,12 @@ module CheckoutSdk
|
|
87
93
|
:otp_value,
|
88
94
|
:purchase_country,
|
89
95
|
:custom_payment_method_ids,
|
96
|
+
:merchant_callback_url,
|
90
97
|
:shipping_delay,
|
91
98
|
:shipping_info,
|
92
|
-
:dlocal
|
99
|
+
:dlocal,
|
100
|
+
:senderInformation,
|
101
|
+
:purpose
|
93
102
|
end
|
94
103
|
end
|
95
104
|
end
|
@@ -4,8 +4,11 @@ module CheckoutSdk
|
|
4
4
|
module Payments
|
5
5
|
# @!attribute enabled
|
6
6
|
# @return [TrueClass, FalseClass]
|
7
|
+
# @!attribute device_session_id
|
8
|
+
# @return [String]
|
7
9
|
class RiskRequest
|
8
|
-
attr_accessor :enabled
|
10
|
+
attr_accessor :enabled,
|
11
|
+
:device_session_id
|
9
12
|
end
|
10
13
|
end
|
11
14
|
end
|
@@ -4,14 +4,16 @@ module CheckoutSdk
|
|
4
4
|
module Payments
|
5
5
|
# @!attribute first_name
|
6
6
|
# @return [String]
|
7
|
+
# @!attribute middle_name
|
8
|
+
# @return [String]
|
7
9
|
# @!attribute last_name
|
8
10
|
# @return [String]
|
11
|
+
# @!attribute dob
|
12
|
+
# @return [String]
|
9
13
|
# @!attribute address
|
10
14
|
# @return [CheckoutSdk::Common::Address]
|
11
15
|
# @!attribute identification
|
12
16
|
# @return [CheckoutSdk::Common::AccountHolderIdentification]
|
13
|
-
# @!attribute middle_name
|
14
|
-
# @return [String]
|
15
17
|
# @!attribute reference_type
|
16
18
|
# @return [String]
|
17
19
|
# @!attribute date_of_birth
|
@@ -24,10 +26,11 @@ module CheckoutSdk
|
|
24
26
|
# @return [String] {CheckoutSdk::Common::Country}
|
25
27
|
class IndividualSender < Sender
|
26
28
|
attr_accessor :first_name,
|
29
|
+
:middle_name,
|
27
30
|
:last_name,
|
31
|
+
:dob,
|
28
32
|
:address,
|
29
33
|
:identification,
|
30
|
-
:middle_name,
|
31
34
|
:reference_type,
|
32
35
|
:date_of_birth,
|
33
36
|
:source_of_funds,
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute reference
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute first_name
|
8
|
+
# @return [String]
|
9
|
+
# @!attribute last_name
|
10
|
+
# @return [String]
|
11
|
+
# @!attribute dob
|
12
|
+
# @return [String]
|
13
|
+
# @!attribute address
|
14
|
+
# @return [String]
|
15
|
+
# @!attribute city
|
16
|
+
# @return [String]
|
17
|
+
# @!attribute state
|
18
|
+
# @return [String]
|
19
|
+
# @!attribute country
|
20
|
+
# @return [String]
|
21
|
+
# @!attribute postal_code
|
22
|
+
# @return [String]
|
23
|
+
# @!attribute source_of_funds
|
24
|
+
# @return [String]
|
25
|
+
# @!attribute purpose
|
26
|
+
# # @return [String]
|
27
|
+
class SenderInformation
|
28
|
+
attr_accessor :reference,
|
29
|
+
:first_name,
|
30
|
+
:last_name,
|
31
|
+
:dob,
|
32
|
+
:address,
|
33
|
+
:city,
|
34
|
+
:state,
|
35
|
+
:country,
|
36
|
+
:postal_code,
|
37
|
+
:source_of_funds,
|
38
|
+
:purpose
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute billing_address
|
6
|
+
# @return [CheckoutSdk::Common::Address]
|
7
|
+
class CvConnectSource < PaymentSource
|
8
|
+
attr_accessor :billing_address
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Common::PaymentSourceType::CV_CONNECT
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute billing_address
|
6
|
+
# @return [CheckoutSdk::Common::Address]
|
7
|
+
class IllicadoSource < PaymentSource
|
8
|
+
attr_accessor :billing_address
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Common::PaymentSourceType::ILLICADO
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute billing_address
|
6
|
+
# @return [CheckoutSdk::Common::Address]
|
7
|
+
class TrustlySource < PaymentSource
|
8
|
+
attr_accessor :billing_address
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super CheckoutSdk::Common::PaymentSourceType::TRUSTLY
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -4,11 +4,14 @@ module CheckoutSdk
|
|
4
4
|
module Payments
|
5
5
|
# @!attribute type
|
6
6
|
# @return [String] {PayoutSourceType}
|
7
|
+
# @!attribute id
|
8
|
+
# @return [String]
|
7
9
|
# @!attribute amount
|
8
10
|
# @return [String]
|
9
11
|
class PayoutSource
|
10
12
|
attr_reader :type
|
11
|
-
attr_accessor :
|
13
|
+
attr_accessor :id,
|
14
|
+
:amount
|
12
15
|
|
13
16
|
protected
|
14
17
|
|
data/lib/checkout_sdk/version.rb
CHANGED
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.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Checkout
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- lib/checkout_sdk/accounts/schedule_frequency_type.rb
|
160
160
|
- lib/checkout_sdk/accounts/schedule_frequency_weekly.rb
|
161
161
|
- lib/checkout_sdk/accounts/schedule_request.rb
|
162
|
+
- lib/checkout_sdk/accounts/update_payment_instrument_request.rb
|
162
163
|
- lib/checkout_sdk/accounts/update_schedule.rb
|
163
164
|
- lib/checkout_sdk/api_client.rb
|
164
165
|
- lib/checkout_sdk/apm/apm.rb
|
@@ -338,6 +339,7 @@ files:
|
|
338
339
|
- lib/checkout_sdk/payments/sender/individual_sender.rb
|
339
340
|
- lib/checkout_sdk/payments/sender/instrument_sender.rb
|
340
341
|
- lib/checkout_sdk/payments/sender/sender.rb
|
342
|
+
- lib/checkout_sdk/payments/sender/sender_information.rb
|
341
343
|
- lib/checkout_sdk/payments/sender/sender_type.rb
|
342
344
|
- lib/checkout_sdk/payments/sender/source_of_funds.rb
|
343
345
|
- lib/checkout_sdk/payments/sender/ticket.rb
|
@@ -348,11 +350,13 @@ files:
|
|
348
350
|
- lib/checkout_sdk/payments/source/apm/alma_source.rb
|
349
351
|
- lib/checkout_sdk/payments/source/apm/bancontact_source.rb
|
350
352
|
- lib/checkout_sdk/payments/source/apm/benefit_source.rb
|
353
|
+
- lib/checkout_sdk/payments/source/apm/cv_connect_source.rb
|
351
354
|
- lib/checkout_sdk/payments/source/apm/eps_source.rb
|
352
355
|
- lib/checkout_sdk/payments/source/apm/fawry_product.rb
|
353
356
|
- lib/checkout_sdk/payments/source/apm/fawry_source.rb
|
354
357
|
- lib/checkout_sdk/payments/source/apm/giropay_source.rb
|
355
358
|
- lib/checkout_sdk/payments/source/apm/ideal_source.rb
|
359
|
+
- lib/checkout_sdk/payments/source/apm/illicado_source.rb
|
356
360
|
- lib/checkout_sdk/payments/source/apm/klarna_source.rb
|
357
361
|
- lib/checkout_sdk/payments/source/apm/knet_source.rb
|
358
362
|
- lib/checkout_sdk/payments/source/apm/mbway_source.rb
|
@@ -364,11 +368,13 @@ files:
|
|
364
368
|
- lib/checkout_sdk/payments/source/apm/sofort_source.rb
|
365
369
|
- lib/checkout_sdk/payments/source/apm/stcpay_source.rb
|
366
370
|
- lib/checkout_sdk/payments/source/apm/tamara_source.rb
|
371
|
+
- lib/checkout_sdk/payments/source/apm/trustly_source.rb
|
367
372
|
- lib/checkout_sdk/payments/source/apm/we_chat_pay_source.rb
|
368
373
|
- lib/checkout_sdk/payments/source/bank_account_source.rb
|
369
374
|
- lib/checkout_sdk/payments/source/card_source.rb
|
370
375
|
- lib/checkout_sdk/payments/source/currency_account_source.rb
|
371
376
|
- lib/checkout_sdk/payments/source/customer_source.rb
|
377
|
+
- lib/checkout_sdk/payments/source/entity_source.rb
|
372
378
|
- lib/checkout_sdk/payments/source/id_source.rb
|
373
379
|
- lib/checkout_sdk/payments/source/network_token_source.rb
|
374
380
|
- lib/checkout_sdk/payments/source/payment_source.rb
|