checkout_sdk 1.2.3 → 1.4.0
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/checkout_sdk/accounts/account_holder.rb +10 -2
- data/lib/checkout_sdk/accounts/account_holder_corporate.rb +15 -0
- data/lib/checkout_sdk/accounts/account_holder_individual.rb +18 -0
- data/lib/checkout_sdk/accounts/accounts.rb +2 -0
- data/lib/checkout_sdk/checkout_api.rb +5 -1
- data/lib/checkout_sdk/common/account_holder.rb +6 -6
- data/lib/checkout_sdk/common/payment_source_type.rb +3 -0
- data/lib/checkout_sdk/common/product.rb +4 -1
- data/lib/checkout_sdk/forward/forward.rb +3 -0
- data/lib/checkout_sdk/forward/forward_client.rb +26 -0
- data/lib/checkout_sdk/oauth_access_token.rb +6 -1
- data/lib/checkout_sdk/oauth_scopes.rb +1 -0
- data/lib/checkout_sdk/oauth_sdk_credentials.rb +2 -1
- data/lib/checkout_sdk/payments/applepay.rb +14 -0
- data/lib/checkout_sdk/payments/{sessions/card.rb → card.rb} +4 -1
- data/lib/checkout_sdk/payments/googlepay.rb +14 -0
- data/lib/checkout_sdk/payments/hosted/hosted_payment_instruction.rb +11 -0
- data/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +29 -22
- data/lib/checkout_sdk/payments/hosted/payment_purpose_type.rb +27 -0
- data/lib/checkout_sdk/payments/locale_type.rb +31 -0
- data/lib/checkout_sdk/payments/payment_method_configuration.rb +17 -0
- data/lib/checkout_sdk/payments/payments.rb +8 -2
- data/lib/checkout_sdk/payments/product.rb +3 -0
- data/lib/checkout_sdk/payments/refund_order.rb +53 -0
- data/lib/checkout_sdk/payments/refund_request.rb +11 -2
- data/lib/checkout_sdk/payments/source/network_token_source.rb +3 -0
- data/lib/checkout_sdk/transfers/create_transfer.rb +5 -5
- data/lib/checkout_sdk/transfers/transfer_source.rb +4 -1
- data/lib/checkout_sdk/transfers/transfers_client.rb +2 -2
- data/lib/checkout_sdk/version.rb +1 -1
- data/lib/checkout_sdk.rb +1 -0
- metadata +17 -7
- data/lib/checkout_sdk/payments/sessions/payment_method_configuration.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7eaf0e31423e11480363f98307c62e05526fd5b08278054afe51c519f0be6693
|
4
|
+
data.tar.gz: db532611e11ae196393c372eb2e578ddd633ceec2136403c46ea2d15632694d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25e1a330e214cedd7de9137033d99b4c22cd9f3e306431c8bbe4ebf7ea7f098aa8734e813d9b31ad287151f259c3d20a78cc79d825aa9359c69a6f3e119e6022
|
7
|
+
data.tar.gz: 37f0915dd19a1b337ea03aaae0732ba884455e42ccb86d2188d7e3e9cc0e449ebca9be9c4c70ba67f34f3411be9a68006f4ec34365fc4a6cabb7caf5b41c2012
|
@@ -21,8 +21,8 @@ module CheckoutSdk
|
|
21
21
|
# @!attribute email
|
22
22
|
# @return [String]
|
23
23
|
class AccountHolder
|
24
|
-
|
25
|
-
|
24
|
+
attr_reader :type
|
25
|
+
attr_accessor :tax_id,
|
26
26
|
:date_of_birth,
|
27
27
|
:country_of_birth,
|
28
28
|
:residential_status,
|
@@ -30,6 +30,14 @@ module CheckoutSdk
|
|
30
30
|
:phone,
|
31
31
|
:identification,
|
32
32
|
:email
|
33
|
+
|
34
|
+
protected
|
35
|
+
|
36
|
+
# @abstract
|
37
|
+
# @param [String] type {MetadataSourceType}
|
38
|
+
def initialize(type)
|
39
|
+
@type = type
|
40
|
+
end
|
33
41
|
end
|
34
42
|
end
|
35
43
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Accounts
|
5
|
+
# @!attribute company_name
|
6
|
+
# @return [String]
|
7
|
+
class AccountHolderCorporate < AccountHolder
|
8
|
+
attr_accessor :company_name
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
super AccountHolderType::CORPORATE
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Accounts
|
5
|
+
# @!attribute first_name
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute last_name
|
8
|
+
# @return [String]
|
9
|
+
class AccountHolderIndividual < AccountHolder
|
10
|
+
attr_accessor :first_name,
|
11
|
+
:last_name
|
12
|
+
|
13
|
+
def initialize
|
14
|
+
super AccountHolderType::INDIVIDUAL
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -8,6 +8,8 @@ require 'checkout_sdk/accounts/document'
|
|
8
8
|
require 'checkout_sdk/accounts/individual'
|
9
9
|
require 'checkout_sdk/accounts/business_type'
|
10
10
|
require 'checkout_sdk/accounts/account_holder'
|
11
|
+
require 'checkout_sdk/accounts/account_holder_corporate'
|
12
|
+
require 'checkout_sdk/accounts/account_holder_individual'
|
11
13
|
require 'checkout_sdk/accounts/entity_financial_details'
|
12
14
|
require 'checkout_sdk/accounts/file_request'
|
13
15
|
require 'checkout_sdk/accounts/date_of_birth'
|
@@ -43,6 +43,8 @@ module CheckoutSdk
|
|
43
43
|
# @return [CheckoutSdk::Payments::PaymentContextsClient]
|
44
44
|
# @!attribute payment_sessions
|
45
45
|
# @return [CheckoutSdk::Payments::PaymentSessionsClient]
|
46
|
+
# @!attribute forward
|
47
|
+
# @return [CheckoutSdk::Forward::ForwardClient]
|
46
48
|
class CheckoutApi
|
47
49
|
attr_reader :customers,
|
48
50
|
:disputes,
|
@@ -64,7 +66,8 @@ module CheckoutSdk
|
|
64
66
|
:financial,
|
65
67
|
:issuing,
|
66
68
|
:contexts,
|
67
|
-
:payment_sessions
|
69
|
+
:payment_sessions,
|
70
|
+
:forward
|
68
71
|
|
69
72
|
# @param [CheckoutConfiguration] configuration
|
70
73
|
def initialize(configuration)
|
@@ -90,6 +93,7 @@ module CheckoutSdk
|
|
90
93
|
@issuing = CheckoutSdk::Issuing::IssuingClient.new api_client, configuration
|
91
94
|
@contexts = CheckoutSdk::Payments::PaymentContextsClient.new api_client, configuration
|
92
95
|
@payment_sessions = CheckoutSdk::Payments::PaymentSessionsClient.new api_client, configuration
|
96
|
+
@forward = CheckoutSdk::Forward::ForwardClient.new(api_client, configuration)
|
93
97
|
end
|
94
98
|
|
95
99
|
private
|
@@ -12,6 +12,10 @@ module CheckoutSdk
|
|
12
12
|
# @return [String]
|
13
13
|
# @!attribute last_name
|
14
14
|
# @return [String]
|
15
|
+
# @!attribute email
|
16
|
+
# @return [String]
|
17
|
+
# @!attribute gender
|
18
|
+
# @return [String]
|
15
19
|
# @!attribute company_name
|
16
20
|
# @return [String]
|
17
21
|
# @!attribute tax_id
|
@@ -28,10 +32,6 @@ module CheckoutSdk
|
|
28
32
|
# @return [Phone]
|
29
33
|
# @!attribute identification
|
30
34
|
# @return [AccountHolderIdentification]
|
31
|
-
# @!attribute email
|
32
|
-
# @return [String]
|
33
|
-
# @!attribute gender
|
34
|
-
# @return [String]
|
35
35
|
# @!attribute account_name_inquiry
|
36
36
|
# @return [Boolean]
|
37
37
|
class AccountHolder
|
@@ -40,6 +40,8 @@ module CheckoutSdk
|
|
40
40
|
:first_name,
|
41
41
|
:middle_name,
|
42
42
|
:last_name,
|
43
|
+
:email,
|
44
|
+
:gender,
|
43
45
|
:company_name,
|
44
46
|
:tax_id,
|
45
47
|
:date_of_birth,
|
@@ -48,8 +50,6 @@ module CheckoutSdk
|
|
48
50
|
:billing_address,
|
49
51
|
:phone,
|
50
52
|
:identification,
|
51
|
-
:email,
|
52
|
-
:gender,
|
53
53
|
:account_name_inquiry
|
54
54
|
end
|
55
55
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Forward
|
5
|
+
class ForwardClient < Client
|
6
|
+
FORWARD = 'forward'
|
7
|
+
private_constant :FORWARD
|
8
|
+
|
9
|
+
# @param [ApiClient] api_client
|
10
|
+
# @param [CheckoutConfiguration] configuration
|
11
|
+
def initialize(api_client, configuration)
|
12
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
|
13
|
+
end
|
14
|
+
|
15
|
+
# @param [Hash] forward_request
|
16
|
+
def forward_request(forward_request)
|
17
|
+
api_client.invoke_post(build_path(FORWARD), sdk_authorization, forward_request)
|
18
|
+
end
|
19
|
+
|
20
|
+
# @param [String] forward_id
|
21
|
+
def get(forward_id)
|
22
|
+
api_client.invoke_get(build_path(FORWARD, forward_id), sdk_authorization)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -3,17 +3,22 @@
|
|
3
3
|
module CheckoutSdk
|
4
4
|
# @!attribute token
|
5
5
|
# @return [String]
|
6
|
+
# @!attribute token_type
|
7
|
+
# @return [String]
|
6
8
|
# @!attribute expiration_date
|
7
9
|
# @return [Time]
|
8
10
|
class OAuthAccessToken
|
9
11
|
attr_accessor :token,
|
12
|
+
:token_type,
|
10
13
|
:expiration_date
|
11
14
|
|
12
15
|
# @param [String] token
|
16
|
+
# @param [String] token_type
|
13
17
|
# @param [Time] expiration_date
|
14
18
|
# @return [OAuthAccessToken]
|
15
|
-
def initialize(token, expiration_date)
|
19
|
+
def initialize(token, token_type, expiration_date)
|
16
20
|
@token = token
|
21
|
+
@token_type = token_type
|
17
22
|
@expiration_date = expiration_date
|
18
23
|
end
|
19
24
|
|
@@ -59,9 +59,9 @@ module CheckoutSdk
|
|
59
59
|
return @access_token unless @access_token.nil? || @access_token.token.nil? || !@access_token.valid?
|
60
60
|
|
61
61
|
data = {
|
62
|
+
grant_type: 'client_credentials',
|
62
63
|
client_id: @client_id,
|
63
64
|
client_secret: @client_secret,
|
64
|
-
grant_type: 'client_credentials',
|
65
65
|
scope: @scopes.join(' ')
|
66
66
|
}
|
67
67
|
|
@@ -81,6 +81,7 @@ module CheckoutSdk
|
|
81
81
|
oauth_response = JSON.parse(response.body, object_class: OpenStruct)
|
82
82
|
|
83
83
|
@access_token = OAuthAccessToken.new(oauth_response.access_token,
|
84
|
+
oauth_response.token_type,
|
84
85
|
Time.now + oauth_response.expires_in)
|
85
86
|
end
|
86
87
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute account_holder
|
6
|
+
# @return [CheckoutSdk::Common::AccountHolder]
|
7
|
+
# @!attribute store_payment_details
|
8
|
+
# @return [String] {StorePaymentDetailsType}
|
9
|
+
class Applepay
|
10
|
+
attr_accessor :account_holder,
|
11
|
+
:store_payment_details
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -2,10 +2,13 @@
|
|
2
2
|
|
3
3
|
module CheckoutSdk
|
4
4
|
module Payments
|
5
|
+
# @!attribute account_holder
|
6
|
+
# @return [CheckoutSdk::Common::AccountHolder]
|
5
7
|
# @!attribute store_payment_details
|
6
8
|
# @return [String] {StorePaymentDetailsType}
|
7
9
|
class Card
|
8
|
-
attr_accessor :
|
10
|
+
attr_accessor :account_holder,
|
11
|
+
:store_payment_details
|
9
12
|
end
|
10
13
|
end
|
11
14
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute account_holder
|
6
|
+
# @return [CheckoutSdk::Common::AccountHolder]
|
7
|
+
# @!attribute store_payment_details
|
8
|
+
# @return [String] {StorePaymentDetailsType}
|
9
|
+
class Googlepay
|
10
|
+
attr_accessor :account_holder,
|
11
|
+
:store_payment_details
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -4,10 +4,18 @@ require 'checkout_sdk/payments/payment_type'
|
|
4
4
|
|
5
5
|
module CheckoutSdk
|
6
6
|
module Payments
|
7
|
-
# @!attribute amount
|
8
|
-
# @return [Integer]
|
9
7
|
# @!attribute currency
|
10
8
|
# @return [String] {CheckoutSdk::Common::Currency}
|
9
|
+
# @!attribute billing
|
10
|
+
# @return [BillingInformation]
|
11
|
+
# @!attribute success_url
|
12
|
+
# @return [String]
|
13
|
+
# @!attribute cancel_url
|
14
|
+
# @return [String]
|
15
|
+
# @!attribute failure_url
|
16
|
+
# @return [String]
|
17
|
+
# @!attribute amount
|
18
|
+
# @return [Integer]
|
11
19
|
# @!attribute payment_type
|
12
20
|
# @return [String] {PaymentType}
|
13
21
|
# @!attribute payment_ip
|
@@ -20,12 +28,14 @@ module CheckoutSdk
|
|
20
28
|
# @return [String]
|
21
29
|
# @!attribute display_name
|
22
30
|
# @return [String]
|
31
|
+
# @!attribute processing_channel_id
|
32
|
+
# @return [String]
|
33
|
+
# @!attribute amount_allocations
|
34
|
+
# @return [Array(CheckoutSdk::Common::AmountAllocations)]
|
23
35
|
# @!attribute customer
|
24
36
|
# @return [CheckoutSdk::Common::CustomerRequest]
|
25
37
|
# @!attribute shipping
|
26
38
|
# @return [ShippingDetails]
|
27
|
-
# @!attribute billing
|
28
|
-
# @return [BillingInformation]
|
29
39
|
# @!attribute recipient
|
30
40
|
# @return [PaymentRecipient]
|
31
41
|
# @!attribute processing
|
@@ -42,29 +52,28 @@ module CheckoutSdk
|
|
42
52
|
# @return [PaymentRetryRequest]
|
43
53
|
# @!attribute sender
|
44
54
|
# @return [CheckoutSdk::Payments::Sender]
|
45
|
-
# @!attribute success_url
|
46
|
-
# @return [String]
|
47
|
-
# @!attribute cancel_url
|
48
|
-
# @return [String]
|
49
|
-
# @!attribute failure_url
|
50
|
-
# @return [String]
|
51
55
|
# @!attribute metadata
|
52
56
|
# @return [Hash(String=>Object)]
|
53
57
|
# @!attribute locale
|
54
|
-
# @return [String]
|
58
|
+
# @return [String] {LocaleType}
|
55
59
|
# @!attribute three_ds
|
56
60
|
# @return [ThreeDSRequest]
|
57
61
|
# @!attribute capture
|
58
62
|
# @return [TrueClass, FalseClass]
|
59
63
|
# @!attribute capture_on
|
60
64
|
# @return [Time]
|
61
|
-
# @!attribute
|
62
|
-
# @return [
|
63
|
-
# @!attribute
|
64
|
-
# @return [
|
65
|
+
# @!attribute instruction
|
66
|
+
# @return [HostedPaymentInstruction]
|
67
|
+
# @!attribute payment_method_configuration
|
68
|
+
# @return [PaymentMethodConfiguration]
|
65
69
|
class HostedPaymentsSession
|
66
|
-
attr_accessor :
|
67
|
-
:
|
70
|
+
attr_accessor :currency,
|
71
|
+
:billing,
|
72
|
+
:success_url,
|
73
|
+
:cancel_url,
|
74
|
+
:failure_url,
|
75
|
+
:amount,
|
76
|
+
:payment_type,
|
68
77
|
:payment_ip,
|
69
78
|
:billing_descriptor,
|
70
79
|
:reference,
|
@@ -74,7 +83,6 @@ module CheckoutSdk
|
|
74
83
|
:amount_allocations,
|
75
84
|
:customer,
|
76
85
|
:shipping,
|
77
|
-
:billing,
|
78
86
|
:recipient,
|
79
87
|
:processing,
|
80
88
|
:allow_payment_methods,
|
@@ -83,14 +91,13 @@ module CheckoutSdk
|
|
83
91
|
:risk,
|
84
92
|
:customer_retry,
|
85
93
|
:sender,
|
86
|
-
:success_url,
|
87
|
-
:cancel_url,
|
88
|
-
:failure_url,
|
89
94
|
:metadata,
|
90
95
|
:locale,
|
91
96
|
:three_ds,
|
92
97
|
:capture,
|
93
|
-
:capture_on
|
98
|
+
:capture_on,
|
99
|
+
:instruction,
|
100
|
+
:payment_method_configuration
|
94
101
|
|
95
102
|
def initialize(payment_type: CheckoutSdk::Payments::PaymentType::REGULAR)
|
96
103
|
@payment_type = payment_type
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
class PaymentPurposeType
|
6
|
+
DONATIONS = 'donations'
|
7
|
+
EDUCATION = 'education'
|
8
|
+
EMERGENCY_NEED = 'emergency_need'
|
9
|
+
EXPATRIATION = 'expatriation'
|
10
|
+
FAMILY_SUPPORT = 'family_support'
|
11
|
+
FINANCIAL_SERVICES = 'financial_services'
|
12
|
+
GIFTS = 'gifts'
|
13
|
+
INCOME = 'income'
|
14
|
+
INSURANCE = 'insurance'
|
15
|
+
INVESTMENT = 'investment'
|
16
|
+
IT_SERVICES = 'it_services'
|
17
|
+
LEISURE = 'leisure'
|
18
|
+
LOAN_PAYMENT = 'loan_payment'
|
19
|
+
MEDICAL_TREATMENT = 'medical_treatment'
|
20
|
+
OTHER = 'other'
|
21
|
+
PENSION = 'pension'
|
22
|
+
ROYALTIES = 'royalties'
|
23
|
+
SAVINGS = 'savings'
|
24
|
+
TRAVEL_AND_TOURISM = 'travel_and_tourism'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
module LocaleType
|
6
|
+
AR = 'ar'
|
7
|
+
DA_DK = 'da-DK'
|
8
|
+
DE_DE = 'de-DE'
|
9
|
+
EL = 'el'
|
10
|
+
EN_GB = 'en-GB'
|
11
|
+
ES_ES = 'es-ES'
|
12
|
+
FI_FI = 'fi-FI'
|
13
|
+
FIL_PH = 'fil-PH'
|
14
|
+
FR_FR = 'fr-FR'
|
15
|
+
HI_IN = 'hi-IN'
|
16
|
+
ID_ID = 'id-ID'
|
17
|
+
IT_IT = 'it-IT'
|
18
|
+
JA_JP = 'ja-JP'
|
19
|
+
MS_MY = 'ms-MY'
|
20
|
+
NB_NO = 'nb-NO'
|
21
|
+
NL_NL = 'nl-NL'
|
22
|
+
PT_PT = 'pt-PT'
|
23
|
+
SV_SE = 'sv-SE'
|
24
|
+
TH_TH = 'th-TH'
|
25
|
+
VI_VN = 'vi-VN'
|
26
|
+
ZH_CN = 'zh-CN'
|
27
|
+
ZH_HK = 'zh-HK'
|
28
|
+
ZH_TW = 'zh-TW'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute applepay
|
6
|
+
# @return [Applepay]
|
7
|
+
# @!attribute card
|
8
|
+
# @return [Card]
|
9
|
+
# @!attribute googlepay
|
10
|
+
# @return [Googlepay]
|
11
|
+
class PaymentMethodConfiguration
|
12
|
+
attr_accessor :applepay,
|
13
|
+
:card,
|
14
|
+
:googlepay
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -17,6 +17,7 @@ require 'checkout_sdk/payments/payment_instruction'
|
|
17
17
|
require 'checkout_sdk/payments/payment_method_details'
|
18
18
|
require 'checkout_sdk/payments/refund_request'
|
19
19
|
require 'checkout_sdk/payments/product'
|
20
|
+
require 'checkout_sdk/payments/refund_order'
|
20
21
|
require 'checkout_sdk/payments/capture_type'
|
21
22
|
require 'checkout_sdk/payments/payment_type'
|
22
23
|
require 'checkout_sdk/payments/merchant_initiated_reason'
|
@@ -42,6 +43,11 @@ require 'checkout_sdk/payments/billing_plan'
|
|
42
43
|
require 'checkout_sdk/payments/billing_plan_type'
|
43
44
|
require 'checkout_sdk/payments/billing_information'
|
44
45
|
require 'checkout_sdk/payments/payments_query_filter'
|
46
|
+
require 'checkout_sdk/payments/payment_method_configuration'
|
47
|
+
require 'checkout_sdk/payments/card'
|
48
|
+
require 'checkout_sdk/payments/applepay'
|
49
|
+
require 'checkout_sdk/payments/googlepay'
|
50
|
+
require 'checkout_sdk/payments/locale_type'
|
45
51
|
|
46
52
|
# Source
|
47
53
|
require 'checkout_sdk/payments/source/payment_source'
|
@@ -156,6 +162,8 @@ require 'checkout_sdk/payments/previous/payments_client'
|
|
156
162
|
# Hosted Payments
|
157
163
|
require 'checkout_sdk/payments/hosted/hosted_payments_session'
|
158
164
|
require 'checkout_sdk/payments/hosted/hosted_payments_client'
|
165
|
+
require 'checkout_sdk/payments/hosted/hosted_payment_instruction'
|
166
|
+
require 'checkout_sdk/payments/hosted/payment_purpose_type'
|
159
167
|
|
160
168
|
# Payment Links
|
161
169
|
require 'checkout_sdk/payments/links/payment_link'
|
@@ -168,6 +176,4 @@ require 'checkout_sdk/payments/contexts/payment_contexts_client'
|
|
168
176
|
require 'checkout_sdk/payments/sessions/payment_sessions_client'
|
169
177
|
require 'checkout_sdk/payments/sessions/payment_sessions_request'
|
170
178
|
require 'checkout_sdk/payments/sessions/payment_methods_type'
|
171
|
-
require 'checkout_sdk/payments/sessions/payment_method_configuration'
|
172
|
-
require 'checkout_sdk/payments/sessions/card'
|
173
179
|
require 'checkout_sdk/payments/sessions/store_payment_details_type'
|
@@ -18,6 +18,8 @@ module CheckoutSdk
|
|
18
18
|
# @return [Integer]
|
19
19
|
# @!attribute tax_amount
|
20
20
|
# @return [Integer]
|
21
|
+
# @!attribute tax_rate
|
22
|
+
# @return [Integer]
|
21
23
|
# @!attribute discount_amount
|
22
24
|
# @return [Integer]
|
23
25
|
# @!attribute wxpay_goods_id
|
@@ -37,6 +39,7 @@ module CheckoutSdk
|
|
37
39
|
:unit_of_measure,
|
38
40
|
:total_amount,
|
39
41
|
:tax_amount,
|
42
|
+
:tax_rate,
|
40
43
|
:discount_amount,
|
41
44
|
:wxpay_goods_id,
|
42
45
|
:image_url,
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CheckoutSdk
|
4
|
+
module Payments
|
5
|
+
# @!attribute name
|
6
|
+
# @return [String]
|
7
|
+
# @!attribute quantity
|
8
|
+
# @return [Integer]
|
9
|
+
# @!attribute unit_price
|
10
|
+
# @return [Integer]
|
11
|
+
# @!attribute reference
|
12
|
+
# @return [String]
|
13
|
+
# @!attribute commodity_code
|
14
|
+
# @return [String]
|
15
|
+
# @!attribute unit_of_measure
|
16
|
+
# @return [String]
|
17
|
+
# @!attribute total_amount
|
18
|
+
# @return [Integer]
|
19
|
+
# @!attribute tax_amount
|
20
|
+
# @return [Integer]
|
21
|
+
# @!attribute tax_rate
|
22
|
+
# @return [Integer]
|
23
|
+
# @!attribute discount_amount
|
24
|
+
# @return [Integer]
|
25
|
+
# @!attribute wxpay_goods_id
|
26
|
+
# @return [String]
|
27
|
+
# @!attribute image_url
|
28
|
+
# @return [String]
|
29
|
+
# @!attribute url
|
30
|
+
# @return [String]
|
31
|
+
# @!attribute sku
|
32
|
+
# @return [String]
|
33
|
+
# @!attribute service_ends_on
|
34
|
+
# @return [Time]
|
35
|
+
class RefundOrder
|
36
|
+
attr_accessor :name,
|
37
|
+
:quantity,
|
38
|
+
:unit_price,
|
39
|
+
:reference,
|
40
|
+
:commodity_code,
|
41
|
+
:unit_of_measure,
|
42
|
+
:total_amount,
|
43
|
+
:tax_amount,
|
44
|
+
:tax_rate,
|
45
|
+
:discount_amount,
|
46
|
+
:wxpay_goods_id,
|
47
|
+
:image_url,
|
48
|
+
:url,
|
49
|
+
:sku,
|
50
|
+
:service_ends_on
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -9,12 +9,21 @@ module CheckoutSdk
|
|
9
9
|
# @!attribute metadata
|
10
10
|
# @return [Hash{String => Object}]
|
11
11
|
# @!attribute amount_allocations
|
12
|
-
# @return [Array(CheckoutSdk::Common::AmountAllocations)]
|
12
|
+
# @return [Array(CheckoutSdk::Common::AmountAllocations)]
|
13
|
+
# @!attribute capture_action_id
|
14
|
+
# @return [String]
|
15
|
+
# @!attribute destination
|
16
|
+
# @return [CheckoutSdk::Common::Destination]
|
17
|
+
# @!attribute items
|
18
|
+
# @return [Array(CheckoutSdk::Payments::RefundOrder)]
|
13
19
|
class RefundRequest
|
14
20
|
attr_accessor :amount,
|
15
21
|
:reference,
|
16
22
|
:metadata,
|
17
|
-
:amount_allocations
|
23
|
+
:amount_allocations,
|
24
|
+
:capture_action_id,
|
25
|
+
:destination,
|
26
|
+
:items
|
18
27
|
end
|
19
28
|
end
|
20
29
|
end
|
@@ -16,6 +16,8 @@ module CheckoutSdk
|
|
16
16
|
# @return [String]
|
17
17
|
# @!attribute stored
|
18
18
|
# @return [TrueClass, FalseClass]
|
19
|
+
# @!attribute store_for_future_use
|
20
|
+
# @return [TrueClass, FalseClass]
|
19
21
|
# @!attribute name
|
20
22
|
# @return [String]
|
21
23
|
# @!attribute cvv
|
@@ -34,6 +36,7 @@ module CheckoutSdk
|
|
34
36
|
:cryptogram,
|
35
37
|
:eci,
|
36
38
|
:stored,
|
39
|
+
:store_for_future_use,
|
37
40
|
:name,
|
38
41
|
:cvv,
|
39
42
|
:billing_address,
|
@@ -2,19 +2,19 @@
|
|
2
2
|
|
3
3
|
module CheckoutSdk
|
4
4
|
module Transfers
|
5
|
-
# @!attribute reference
|
6
|
-
# @return [String]
|
7
5
|
# @!attribute transfer_type
|
8
6
|
# @return [String] {TransferType}
|
9
7
|
# @!attribute source
|
10
8
|
# @return [TransferSource]
|
11
9
|
# @!attribute destination
|
12
10
|
# @return [TransferDestination]
|
11
|
+
# @!attribute reference
|
12
|
+
# @return [String]
|
13
13
|
class CreateTransfer
|
14
|
-
attr_accessor :
|
15
|
-
:transfer_type,
|
14
|
+
attr_accessor :transfer_type,
|
16
15
|
:source,
|
17
|
-
:destination
|
16
|
+
:destination,
|
17
|
+
:reference
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -6,9 +6,12 @@ module CheckoutSdk
|
|
6
6
|
# @return [String]
|
7
7
|
# @!attribute amount
|
8
8
|
# @return [Integer]
|
9
|
+
# @!attribute currency
|
10
|
+
# @return [CheckoutSdk::Common::Currency]
|
9
11
|
class TransferSource
|
10
12
|
attr_accessor :id,
|
11
|
-
:amount
|
13
|
+
:amount,
|
14
|
+
:currency
|
12
15
|
end
|
13
16
|
end
|
14
17
|
end
|
@@ -13,8 +13,8 @@ module CheckoutSdk
|
|
13
13
|
end
|
14
14
|
|
15
15
|
# @param [Hash, CreateTransfer] create_transfer
|
16
|
-
# @param [String
|
17
|
-
def initiate_transfer_of_funds(create_transfer, idempotency_key
|
16
|
+
# @param [String] idempotency_key
|
17
|
+
def initiate_transfer_of_funds(create_transfer, idempotency_key)
|
18
18
|
api_client.invoke_post(TRANSFERS, sdk_authorization, create_transfer, idempotency_key)
|
19
19
|
end
|
20
20
|
|
data/lib/checkout_sdk/version.rb
CHANGED
data/lib/checkout_sdk.rb
CHANGED
@@ -67,6 +67,7 @@ require 'checkout_sdk/transfers/transfers'
|
|
67
67
|
require 'checkout_sdk/metadata/metadata'
|
68
68
|
require 'checkout_sdk/financial/financial'
|
69
69
|
require 'checkout_sdk/issuing/issuing'
|
70
|
+
require 'checkout_sdk/forward/forward'
|
70
71
|
|
71
72
|
# Checkout modules (previous)
|
72
73
|
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.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Checkout
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -127,6 +127,8 @@ files:
|
|
127
127
|
- lib/checkout_sdk.rb
|
128
128
|
- lib/checkout_sdk/abstract_checkout_sdk_builder.rb
|
129
129
|
- lib/checkout_sdk/accounts/account_holder.rb
|
130
|
+
- lib/checkout_sdk/accounts/account_holder_corporate.rb
|
131
|
+
- lib/checkout_sdk/accounts/account_holder_individual.rb
|
130
132
|
- lib/checkout_sdk/accounts/accounts.rb
|
131
133
|
- lib/checkout_sdk/accounts/accounts_client.rb
|
132
134
|
- lib/checkout_sdk/accounts/additional_document.rb
|
@@ -255,6 +257,8 @@ files:
|
|
255
257
|
- lib/checkout_sdk/forex/forex_source.rb
|
256
258
|
- lib/checkout_sdk/forex/quote_request.rb
|
257
259
|
- lib/checkout_sdk/forex/rates_query_filter.rb
|
260
|
+
- lib/checkout_sdk/forward/forward.rb
|
261
|
+
- lib/checkout_sdk/forward/forward_client.rb
|
258
262
|
- lib/checkout_sdk/http_metadata.rb
|
259
263
|
- lib/checkout_sdk/instruments/base_instruments_client.rb
|
260
264
|
- lib/checkout_sdk/instruments/create/instrument.rb
|
@@ -290,6 +294,7 @@ files:
|
|
290
294
|
- lib/checkout_sdk/oauth_scopes.rb
|
291
295
|
- lib/checkout_sdk/oauth_sdk_credentials.rb
|
292
296
|
- lib/checkout_sdk/payments/airline_data.rb
|
297
|
+
- lib/checkout_sdk/payments/applepay.rb
|
293
298
|
- lib/checkout_sdk/payments/authorization_request.rb
|
294
299
|
- lib/checkout_sdk/payments/authorization_type.rb
|
295
300
|
- lib/checkout_sdk/payments/base_payments_client.rb
|
@@ -299,6 +304,7 @@ files:
|
|
299
304
|
- lib/checkout_sdk/payments/billing_plan_type.rb
|
300
305
|
- lib/checkout_sdk/payments/capture_request.rb
|
301
306
|
- lib/checkout_sdk/payments/capture_type.rb
|
307
|
+
- lib/checkout_sdk/payments/card.rb
|
302
308
|
- lib/checkout_sdk/payments/charge_bearer.rb
|
303
309
|
- lib/checkout_sdk/payments/contexts/payment_contexts_client.rb
|
304
310
|
- lib/checkout_sdk/payments/d_local_installments.rb
|
@@ -311,11 +317,15 @@ files:
|
|
311
317
|
- lib/checkout_sdk/payments/destination/token_destination.rb
|
312
318
|
- lib/checkout_sdk/payments/exemption.rb
|
313
319
|
- lib/checkout_sdk/payments/flight_leg_details.rb
|
320
|
+
- lib/checkout_sdk/payments/googlepay.rb
|
321
|
+
- lib/checkout_sdk/payments/hosted/hosted_payment_instruction.rb
|
314
322
|
- lib/checkout_sdk/payments/hosted/hosted_payments_client.rb
|
315
323
|
- lib/checkout_sdk/payments/hosted/hosted_payments_session.rb
|
324
|
+
- lib/checkout_sdk/payments/hosted/payment_purpose_type.rb
|
316
325
|
- lib/checkout_sdk/payments/instruction_scheme.rb
|
317
326
|
- lib/checkout_sdk/payments/links/payment_link.rb
|
318
327
|
- lib/checkout_sdk/payments/links/payments_links_client.rb
|
328
|
+
- lib/checkout_sdk/payments/locale_type.rb
|
319
329
|
- lib/checkout_sdk/payments/merchant_initiated_reason.rb
|
320
330
|
- lib/checkout_sdk/payments/network_token_type.rb
|
321
331
|
- lib/checkout_sdk/payments/os_type.rb
|
@@ -324,6 +334,7 @@ files:
|
|
324
334
|
- lib/checkout_sdk/payments/passenger_name.rb
|
325
335
|
- lib/checkout_sdk/payments/payer.rb
|
326
336
|
- lib/checkout_sdk/payments/payment_instruction.rb
|
337
|
+
- lib/checkout_sdk/payments/payment_method_configuration.rb
|
327
338
|
- lib/checkout_sdk/payments/payment_method_details.rb
|
328
339
|
- lib/checkout_sdk/payments/payment_recipient.rb
|
329
340
|
- lib/checkout_sdk/payments/payment_request.rb
|
@@ -376,6 +387,7 @@ files:
|
|
376
387
|
- lib/checkout_sdk/payments/processing_settings.rb
|
377
388
|
- lib/checkout_sdk/payments/product.rb
|
378
389
|
- lib/checkout_sdk/payments/product_type.rb
|
390
|
+
- lib/checkout_sdk/payments/refund_order.rb
|
379
391
|
- lib/checkout_sdk/payments/refund_request.rb
|
380
392
|
- lib/checkout_sdk/payments/reverse_request.rb
|
381
393
|
- lib/checkout_sdk/payments/risk_request.rb
|
@@ -388,8 +400,6 @@ files:
|
|
388
400
|
- lib/checkout_sdk/payments/sender/sender_type.rb
|
389
401
|
- lib/checkout_sdk/payments/sender/source_of_funds.rb
|
390
402
|
- lib/checkout_sdk/payments/sender/ticket.rb
|
391
|
-
- lib/checkout_sdk/payments/sessions/card.rb
|
392
|
-
- lib/checkout_sdk/payments/sessions/payment_method_configuration.rb
|
393
403
|
- lib/checkout_sdk/payments/sessions/payment_methods_type.rb
|
394
404
|
- lib/checkout_sdk/payments/sessions/payment_sessions_client.rb
|
395
405
|
- lib/checkout_sdk/payments/sessions/payment_sessions_request.rb
|
@@ -571,7 +581,7 @@ metadata:
|
|
571
581
|
homepage_uri: https://www.checkout.com/
|
572
582
|
source_code_uri: https://github.com/checkout/checkout-sdk-ruby
|
573
583
|
documentation_uri: https://www.checkout.com/docs
|
574
|
-
post_install_message:
|
584
|
+
post_install_message:
|
575
585
|
rdoc_options: []
|
576
586
|
require_paths:
|
577
587
|
- lib
|
@@ -587,7 +597,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
587
597
|
version: '0'
|
588
598
|
requirements: []
|
589
599
|
rubygems_version: 3.0.3.1
|
590
|
-
signing_key:
|
600
|
+
signing_key:
|
591
601
|
specification_version: 4
|
592
602
|
summary: Ruby wrapper for Checkout API
|
593
603
|
test_files: []
|