checkout_sdk 1.0.0.beta.0 → 1.0.0.beta.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.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -0
  3. data/lib/checkout_sdk/api_client.rb +6 -2
  4. data/lib/checkout_sdk/apm/apm.rb +0 -1
  5. data/lib/checkout_sdk/apm/previous/klarna/credit_session_request.rb +19 -21
  6. data/lib/checkout_sdk/apm/previous/klarna/klarna.rb +13 -15
  7. data/lib/checkout_sdk/apm/previous/klarna/klarna_client.rb +43 -45
  8. data/lib/checkout_sdk/apm/previous/klarna/klarna_product.rb +19 -21
  9. data/lib/checkout_sdk/apm/previous/klarna/order_capture_request.rb +24 -26
  10. data/lib/checkout_sdk/apm/previous/sepa/sepa_client.rb +25 -27
  11. data/lib/checkout_sdk/checkout_utils.rb +13 -4
  12. data/lib/checkout_sdk/common/account_holder.rb +4 -1
  13. data/lib/checkout_sdk/common/common.rb +2 -0
  14. data/lib/checkout_sdk/common/marketplace_data.rb +14 -0
  15. data/lib/checkout_sdk/common/payment_source_type.rb +1 -0
  16. data/lib/checkout_sdk/common/shipping_info.rb +29 -0
  17. data/lib/checkout_sdk/customers/customer_request.rb +2 -2
  18. data/lib/checkout_sdk/disputes/disputes_client.rb +5 -0
  19. data/lib/checkout_sdk/disputes/disputes_query_filter.rb +3 -3
  20. data/lib/checkout_sdk/instruments/base_instruments_client.rb +20 -0
  21. data/lib/checkout_sdk/instruments/create/{instrument_request.rb → instrument.rb} +1 -1
  22. data/lib/checkout_sdk/instruments/create/{instrument_bank_account_request.rb → instrument_bank_account.rb} +1 -1
  23. data/lib/checkout_sdk/instruments/create/{instrument_token_request.rb → instrument_token.rb} +1 -1
  24. data/lib/checkout_sdk/instruments/instruments.rb +14 -7
  25. data/lib/checkout_sdk/instruments/instruments_client.rb +4 -15
  26. data/lib/checkout_sdk/instruments/previous/create/instrument.rb +26 -0
  27. data/lib/checkout_sdk/instruments/previous/instruments_client.rb +28 -0
  28. data/lib/checkout_sdk/instruments/previous/update/update_instrument.rb +25 -0
  29. data/lib/checkout_sdk/instruments/update/{update_instrument_request.rb → update_instrument.rb} +1 -1
  30. data/lib/checkout_sdk/instruments/update/{update_instrument_bank_account_request.rb → update_instrument_bank_account.rb} +1 -1
  31. data/lib/checkout_sdk/instruments/update/{update_instrument_card_request.rb → update_instrument_card.rb} +1 -1
  32. data/lib/checkout_sdk/instruments/update/{update_instrument_token_request.rb → update_instrument_token.rb} +1 -1
  33. data/lib/checkout_sdk/payments/base_payments_client.rb +41 -0
  34. data/lib/checkout_sdk/payments/billing_plan.rb +17 -0
  35. data/lib/checkout_sdk/payments/billing_plan_type.rb +14 -0
  36. data/lib/checkout_sdk/payments/capture_request.rb +4 -0
  37. data/lib/checkout_sdk/payments/destination/destination.rb +1 -1
  38. data/lib/checkout_sdk/payments/payment_request.rb +5 -1
  39. data/lib/checkout_sdk/payments/payments.rb +81 -23
  40. data/lib/checkout_sdk/payments/payments_client.rb +1 -36
  41. data/lib/checkout_sdk/payments/payout_request.rb +1 -1
  42. data/lib/checkout_sdk/payments/previous/capture_request.rb +19 -0
  43. data/lib/checkout_sdk/payments/previous/destination/card_destination.rb +38 -0
  44. data/lib/checkout_sdk/payments/previous/destination/destination.rb +21 -0
  45. data/lib/checkout_sdk/payments/previous/destination/id_destination.rb +23 -0
  46. data/lib/checkout_sdk/payments/previous/destination/token_destination.rb +29 -0
  47. data/lib/checkout_sdk/payments/previous/fund_transfer_type.rb +17 -0
  48. data/lib/checkout_sdk/payments/previous/payment_request.rb +73 -0
  49. data/lib/checkout_sdk/payments/previous/payments_client.rb +43 -0
  50. data/lib/checkout_sdk/payments/previous/payout_request.rb +70 -0
  51. data/lib/checkout_sdk/payments/previous/source/apm/alipay_source.rb +13 -0
  52. data/lib/checkout_sdk/payments/previous/source/apm/alma_source.rb +23 -0
  53. data/lib/checkout_sdk/payments/previous/source/apm/bancontact_source.rb +26 -0
  54. data/lib/checkout_sdk/payments/previous/source/apm/benefit_pay_source.rb +17 -0
  55. data/lib/checkout_sdk/payments/previous/source/apm/boleto_source.rb +26 -0
  56. data/lib/checkout_sdk/payments/previous/source/apm/eps_source.rb +20 -0
  57. data/lib/checkout_sdk/payments/previous/source/apm/fawry_source.rb +47 -0
  58. data/lib/checkout_sdk/payments/previous/source/apm/giropay_source.rb +32 -0
  59. data/lib/checkout_sdk/payments/previous/source/apm/ideal_source.rb +23 -0
  60. data/lib/checkout_sdk/payments/previous/source/apm/integration_type.rb +12 -0
  61. data/lib/checkout_sdk/payments/previous/source/apm/klarna_source.rb +56 -0
  62. data/lib/checkout_sdk/payments/previous/source/apm/knet_source.rb +38 -0
  63. data/lib/checkout_sdk/payments/previous/source/apm/multi_banco_source.rb +23 -0
  64. data/lib/checkout_sdk/payments/previous/source/apm/oxxo_source.rb +26 -0
  65. data/lib/checkout_sdk/payments/previous/source/apm/p24_source.rb +26 -0
  66. data/lib/checkout_sdk/payments/previous/source/apm/pago_facil_source.rb +26 -0
  67. data/lib/checkout_sdk/payments/previous/source/apm/paypal_source.rb +26 -0
  68. data/lib/checkout_sdk/payments/previous/source/apm/poli_source.rb +13 -0
  69. data/lib/checkout_sdk/payments/previous/source/apm/qpay_source.rb +26 -0
  70. data/lib/checkout_sdk/payments/previous/source/apm/rapi_pago_source.rb +26 -0
  71. data/lib/checkout_sdk/payments/previous/source/apm/sofort_source.rb +20 -0
  72. data/lib/checkout_sdk/payments/previous/source/card_source.rb +41 -0
  73. data/lib/checkout_sdk/payments/previous/source/customer_source.rb +17 -0
  74. data/lib/checkout_sdk/payments/previous/source/d_local_source.rb +41 -0
  75. data/lib/checkout_sdk/payments/previous/source/id_source.rb +20 -0
  76. data/lib/checkout_sdk/payments/previous/source/network_token_source.rb +47 -0
  77. data/lib/checkout_sdk/payments/previous/source/payment_source.rb +20 -0
  78. data/lib/checkout_sdk/payments/previous/source/token_source.rb +26 -0
  79. data/lib/checkout_sdk/payments/processing_settings.rb +15 -0
  80. data/lib/checkout_sdk/payments/sender/sender.rb +2 -2
  81. data/lib/checkout_sdk/payments/source/apm/after_pay_source.rb +1 -1
  82. data/lib/checkout_sdk/payments/source/apm/alipay_plus_source.rb +1 -1
  83. data/lib/checkout_sdk/payments/source/apm/alma_source.rb +15 -0
  84. data/lib/checkout_sdk/payments/source/apm/bancontact_source.rb +1 -1
  85. data/lib/checkout_sdk/payments/source/apm/benefit_source.rb +1 -1
  86. data/lib/checkout_sdk/payments/source/apm/eps_source.rb +1 -1
  87. data/lib/checkout_sdk/payments/source/apm/fawry_product.rb +20 -0
  88. data/lib/checkout_sdk/payments/source/apm/fawry_source.rb +30 -0
  89. data/lib/checkout_sdk/payments/source/apm/giropay_source.rb +1 -1
  90. data/lib/checkout_sdk/payments/source/apm/ideal_source.rb +1 -1
  91. data/lib/checkout_sdk/payments/source/apm/klarna_source.rb +15 -0
  92. data/lib/checkout_sdk/payments/source/apm/knet_source.rb +1 -1
  93. data/lib/checkout_sdk/payments/source/apm/mbway_source.rb +1 -1
  94. data/lib/checkout_sdk/payments/source/apm/multi_banco_source.rb +1 -1
  95. data/lib/checkout_sdk/payments/source/apm/p24_source.rb +1 -1
  96. data/lib/checkout_sdk/payments/source/apm/paypal_source.rb +5 -1
  97. data/lib/checkout_sdk/payments/source/apm/post_finance_source.rb +1 -1
  98. data/lib/checkout_sdk/payments/source/apm/qpay_source.rb +1 -1
  99. data/lib/checkout_sdk/payments/source/apm/sofort_source.rb +1 -1
  100. data/lib/checkout_sdk/payments/source/apm/stcpay_source.rb +1 -1
  101. data/lib/checkout_sdk/payments/source/apm/tamara_source.rb +1 -1
  102. data/lib/checkout_sdk/payments/source/apm/we_chat_pay_source.rb +1 -1
  103. data/lib/checkout_sdk/payments/source/bank_account_source.rb +1 -1
  104. data/lib/checkout_sdk/payments/source/card_source.rb +1 -1
  105. data/lib/checkout_sdk/payments/source/currency_account_source.rb +1 -1
  106. data/lib/checkout_sdk/payments/source/id_source.rb +1 -1
  107. data/lib/checkout_sdk/payments/source/network_token_source.rb +1 -1
  108. data/lib/checkout_sdk/payments/source/{payment_request_source.rb → payment_source.rb} +1 -1
  109. data/lib/checkout_sdk/payments/source/{payout_request_source.rb → payout_source.rb} +3 -3
  110. data/lib/checkout_sdk/payments/source/provider_token_source.rb +1 -1
  111. data/lib/checkout_sdk/payments/source/token_source.rb +1 -1
  112. data/lib/checkout_sdk/payments/three_ds_request.rb +4 -1
  113. data/lib/checkout_sdk/previous/checkout_api.rb +29 -5
  114. data/lib/checkout_sdk/sources/mandate_type.rb +12 -0
  115. data/lib/checkout_sdk/sources/sepa_source_request.rb +20 -0
  116. data/lib/checkout_sdk/sources/source_data.rb +28 -0
  117. data/lib/checkout_sdk/sources/source_request.rb +30 -0
  118. data/lib/checkout_sdk/sources/source_type.rb +11 -0
  119. data/lib/checkout_sdk/sources/sources.rb +9 -0
  120. data/lib/checkout_sdk/sources/sources_client.rb +23 -0
  121. data/lib/checkout_sdk/tokens/wallet_token_request.rb +1 -1
  122. data/lib/checkout_sdk/version.rb +1 -1
  123. data/lib/checkout_sdk.rb +3 -0
  124. metadata +68 -12
  125. data/lib/checkout_sdk/apm/previous/klarna/klarna_shipping_info.rb +0 -33
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ # @!attribute quantity
7
+ # @return [Integer]
8
+ # @!attribute description
9
+ # @return [String]
10
+ # @!attribute language
11
+ # @return [String]
12
+ # @!attribute national_id
13
+ # @return [String]
14
+ class QPaySource < PaymentSource
15
+ attr_accessor :quantity,
16
+ :description,
17
+ :language,
18
+ :national_id
19
+
20
+ def initialize
21
+ super CheckoutSdk::Common::PaymentSourceType::QPAY
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ # @!attribute integration_type
7
+ # @return [String] {IntegrationType}
8
+ # @!attribute country
9
+ # @return [String] {CheckoutSdk::Common::Country}
10
+ # @!attribute description
11
+ # @return [String]
12
+ # @!attribute payer
13
+ # @return [CheckoutSdk::Payments::Payer]
14
+ class RapiPagoSource < PaymentSource
15
+ attr_accessor :integration_type,
16
+ :country,
17
+ :description,
18
+ :payer
19
+
20
+ def initialize
21
+ super CheckoutSdk::Common::PaymentSourceType::RAPIPAGO
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ # @!attribute countryCode
7
+ # @return [String] {CheckoutSdk::Common::Country}
8
+ # @!attribute languageCode
9
+ # @return [String]
10
+ class SofortSource < PaymentSource
11
+ attr_accessor :countryCode,
12
+ :languageCode
13
+
14
+ def initialize
15
+ super CheckoutSdk::Common::PaymentSourceType::SOFORT
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ # @!attribute number
7
+ # @return [String]
8
+ # @!attribute expiry_month
9
+ # @return [Integer]
10
+ # @!attribute expiry_year
11
+ # @return [Integer]
12
+ # @!attribute name
13
+ # @return [String]
14
+ # @!attribute cvv
15
+ # @return [String]
16
+ # @!attribute stored
17
+ # @return [TrueClass, FalseClass]
18
+ # @!attribute store_for_future_use
19
+ # @return [TrueClass, FalseClass]
20
+ # @!attribute billing_address
21
+ # @return [CheckoutSdk::Common::Address]
22
+ # @!attribute phone
23
+ # @return [CheckoutSdk::Common::Phone]
24
+ class CardSource < PaymentSource
25
+ attr_accessor :number,
26
+ :expiry_month,
27
+ :expiry_year,
28
+ :name,
29
+ :cvv,
30
+ :stored,
31
+ :store_for_future_use,
32
+ :billing_address,
33
+ :phone
34
+
35
+ def initialize
36
+ super CheckoutSdk::Common::PaymentSourceType::CARD
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ # @!attribute id
7
+ # @return [String]
8
+ class CustomerSource < PaymentSource
9
+ attr_accessor :id
10
+
11
+ def initialize
12
+ super CheckoutSdk::Common::PaymentSourceType::CUSTOMER
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ # @!attribute number
7
+ # @return [String]
8
+ # @!attribute expiry_month
9
+ # @return [Integer]
10
+ # @!attribute expiry_year
11
+ # @return [Integer]
12
+ # @!attribute name
13
+ # @return [String]
14
+ # @!attribute cvv
15
+ # @return [String]
16
+ # @!attribute stored
17
+ # @return [TrueClass, FalseClass]
18
+ # @!attribute store_for_future_use
19
+ # @return [TrueClass, FalseClass]
20
+ # @!attribute billing_address
21
+ # @return [CheckoutSdk::Common::Address]
22
+ # @!attribute phone
23
+ # @return [CheckoutSdk::Common::Phone]
24
+ class DLocalSource < PaymentSource
25
+ attr_accessor :number,
26
+ :expiry_month,
27
+ :expiry_year,
28
+ :name,
29
+ :cvv,
30
+ :stored,
31
+ :store_for_future_use,
32
+ :billing_address,
33
+ :phone
34
+
35
+ def initialize
36
+ super CheckoutSdk::Common::PaymentSourceType::D_LOCAL
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ # @!attribute id
7
+ # @return [String]
8
+ # @!attribute cvv
9
+ # @return [String]
10
+ class IdSource < PaymentSource
11
+ attr_accessor :id,
12
+ :cvv
13
+
14
+ def initialize
15
+ super CheckoutSdk::Common::PaymentSourceType::ID
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ # @!attribute token
7
+ # @return [String]
8
+ # @!attribute expiry_month
9
+ # @return [Integer]
10
+ # @!attribute expiry_year
11
+ # @return [Integer]
12
+ # @!attribute token_type
13
+ # @return [String] {CheckoutSdk::Payments::NetworkTokenType}
14
+ # @!attribute cryptogram
15
+ # @return [String]
16
+ # @!attribute eci
17
+ # @return [String]
18
+ # @!attribute stored
19
+ # @return [TrueClass, FalseClass]
20
+ # @!attribute name
21
+ # @return [String]
22
+ # @!attribute cvv
23
+ # @return [String]
24
+ # @!attribute billing_address
25
+ # @return [CheckoutSdk::Common::Address]
26
+ # @!attribute phone
27
+ # @return [CheckoutSdk::Common::Phone]
28
+ class NetworkTokenSource < PaymentSource
29
+ attr_accessor :token,
30
+ :expiry_month,
31
+ :expiry_year,
32
+ :token_type,
33
+ :cryptogram,
34
+ :eci,
35
+ :stored,
36
+ :name,
37
+ :cvv,
38
+ :billing_address,
39
+ :phone
40
+
41
+ def initialize
42
+ super CheckoutSdk::Common::PaymentSourceType::NETWORK_TOKEN
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ # @!attribute type
7
+ # @return [String] {CheckoutSdk::Common::PaymentSourceType}
8
+ class PaymentSource
9
+ attr_reader :type
10
+
11
+ protected
12
+
13
+ # @param [String] type {CheckoutSdk::Common::PaymentSourceType}
14
+ def initialize(type)
15
+ @type = type
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ # @!attribute token
7
+ # @return [String]
8
+ # @!attribute billing_address
9
+ # @return [CheckoutSdk::Common::Address]
10
+ # @!attribute phone
11
+ # @return [CheckoutSdk::Common::Phone]
12
+ # @!attribute store_for_future_use
13
+ # @return [TrueClass, FalseClass]
14
+ class TokenSource < PaymentSource
15
+ attr_accessor :token,
16
+ :billing_address,
17
+ :phone,
18
+ :store_for_future_use
19
+
20
+ def initialize
21
+ super CheckoutSdk::Common::PaymentSourceType::TOKEN
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -48,6 +48,16 @@ module CheckoutSdk
48
48
  # @return [Array(Hash{String => String})]
49
49
  # @!attribute airline_data
50
50
  # @return [Array(AirlineData)]
51
+ # @!attribute otp_value
52
+ # @return [String]
53
+ # @!attribute purchase_country
54
+ # @return [String] {CheckoutSdk::Common::Country}
55
+ # @!attribute custom_payment_method_ids
56
+ # @return [Array(String)]
57
+ # @!attribute shipping_delay
58
+ # @return [Integer]
59
+ # @!attribute shipping_info
60
+ # @return [Array(CheckoutSdk::Common::ShippingInfo)]
51
61
  # @!attribute dlocal
52
62
  # @return [DLocalProcessingSettings]
53
63
  class ProcessingSettings
@@ -74,6 +84,11 @@ module CheckoutSdk
74
84
  :user_action,
75
85
  :set_transaction_context,
76
86
  :airline_data,
87
+ :otp_value,
88
+ :purchase_country,
89
+ :custom_payment_method_ids,
90
+ :shipping_delay,
91
+ :shipping_info,
77
92
  :dlocal
78
93
  end
79
94
  end
@@ -7,8 +7,8 @@ module CheckoutSdk
7
7
  # @!attribute reference
8
8
  # @return [String]
9
9
  class Sender
10
- attr_accessor :type,
11
- :reference
10
+ attr_reader :type
11
+ attr_accessor :reference
12
12
 
13
13
  protected
14
14
 
@@ -4,7 +4,7 @@ module CheckoutSdk
4
4
  module Payments
5
5
  # @!attribute account_holder
6
6
  # @return [CheckoutSdk::Common::AccountHolder]
7
- class AfterPaySource < PaymentRequestSource
7
+ class AfterPaySource < PaymentSource
8
8
  attr_accessor :account_holder
9
9
 
10
10
  def initialize
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
- class AlipayPlusSource < PaymentRequestSource
5
+ class AlipayPlusSource < PaymentSource
6
6
  # @return [AlipayPlusSource] of type {CheckoutSdk::Common::PaymentSourceType::ALIPAY_PLUS}
7
7
  def self.alipay_plus_source
8
8
  AlipayPlusSource.new CheckoutSdk::Common::PaymentSourceType::ALIPAY_PLUS
@@ -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 AlmaSource < PaymentSource
8
+ attr_accessor :billing_address
9
+
10
+ def initialize
11
+ super CheckoutSdk::Common::PaymentSourceType::ALMA
12
+ end
13
+ end
14
+ end
15
+ end
@@ -10,7 +10,7 @@ module CheckoutSdk
10
10
  # @return [String]
11
11
  # @!attribute language
12
12
  # @return [String]
13
- class BancontactSource < PaymentRequestSource
13
+ class BancontactSource < PaymentSource
14
14
  attr_accessor :payment_country,
15
15
  :account_holder_name,
16
16
  :billing_descriptor,
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
- class BenefitSource < PaymentRequestSource
5
+ class BenefitSource < PaymentSource
6
6
  def initialize
7
7
  super CheckoutSdk::Common::PaymentSourceType::BENEFIT
8
8
  end
@@ -4,7 +4,7 @@ module CheckoutSdk
4
4
  module Payments
5
5
  # @!attribute purpose
6
6
  # @return [String]
7
- class EPSSource < PaymentRequestSource
7
+ class EPSSource < PaymentSource
8
8
  attr_accessor :purpose
9
9
 
10
10
  def initialize
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # @!attribute product_id
6
+ # @return [String]
7
+ # @!attribute quantity
8
+ # @return [Integer]
9
+ # @!attribute price
10
+ # @return [Integer]
11
+ # @!attribute description
12
+ # @return [String]
13
+ class FawryProduct
14
+ attr_accessor :product_id,
15
+ :quantity,
16
+ :price,
17
+ :description
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # @!attribute description
6
+ # @return [String]
7
+ # @!attribute customer_profile_id
8
+ # @return [String]
9
+ # @!attribute customer_email
10
+ # @return [String]
11
+ # @!attribute customer_mobile
12
+ # @return [String]
13
+ # @!attribute expires_on
14
+ # @return [Time]
15
+ # @!attribute products
16
+ # @return [Array(FawryProduct)]
17
+ class FawrySource < PaymentSource
18
+ attr_accessor :description,
19
+ :customer_profile_id,
20
+ :customer_email,
21
+ :customer_mobile,
22
+ :expires_on,
23
+ :products
24
+
25
+ def initialize
26
+ super CheckoutSdk::Common::PaymentSourceType::FAWRY
27
+ end
28
+ end
29
+ end
30
+ end
@@ -6,7 +6,7 @@ module CheckoutSdk
6
6
  # @return [String]
7
7
  # @!attribute info_fields
8
8
  # @return [Array(InfoFields)]
9
- class GiropaySource < PaymentRequestSource
9
+ class GiropaySource < PaymentSource
10
10
  attr_accessor :purpose,
11
11
  :info_fields
12
12
 
@@ -8,7 +8,7 @@ module CheckoutSdk
8
8
  # @return [String]
9
9
  # @!attribute language
10
10
  # @return [String]
11
- class IdealSource < PaymentRequestSource
11
+ class IdealSource < PaymentSource
12
12
  attr_accessor :bic,
13
13
  :description,
14
14
  :language
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # @!attribute account_holder
6
+ # @return [CheckoutSdk::Common::AccountHolder]
7
+ class KlarnaSource < PaymentSource
8
+ attr_accessor :account_holder
9
+
10
+ def initialize
11
+ super CheckoutSdk::Common::PaymentSourceType::KLARNA
12
+ end
13
+ end
14
+ end
15
+ end
@@ -18,7 +18,7 @@ module CheckoutSdk
18
18
  # @return [String]
19
19
  # @!attribute ptlf
20
20
  # @return [String]
21
- class KnetSource < PaymentRequestSource
21
+ class KnetSource < PaymentSource
22
22
  attr_accessor :language,
23
23
  :user_defined_field1,
24
24
  :user_defined_field2,
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
- class MbwaySource < PaymentRequestSource
5
+ class MbwaySource < PaymentSource
6
6
  def initialize
7
7
  super CheckoutSdk::Common::PaymentSourceType::MBWAY
8
8
  end
@@ -8,7 +8,7 @@ module CheckoutSdk
8
8
  # @return [String]
9
9
  # @!attribute billing_descriptor
10
10
  # @return [String]
11
- class MultiBancoSource < PaymentRequestSource
11
+ class MultiBancoSource < PaymentSource
12
12
  attr_accessor :payment_country,
13
13
  :account_holder_name,
14
14
  :billing_descriptor
@@ -10,7 +10,7 @@ module CheckoutSdk
10
10
  # @return [String]
11
11
  # @!attribute billing_descriptor
12
12
  # @return [String]
13
- class P24Source < PaymentRequestSource
13
+ class P24Source < PaymentSource
14
14
  attr_accessor :payment_country,
15
15
  :account_holder_name,
16
16
  :account_holder_email,
@@ -2,7 +2,11 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
- class PayPalSource < PaymentRequestSource
5
+ # @!attribute plan
6
+ # @return [BillingPlan]
7
+ class PayPalSource < PaymentSource
8
+ attr_accessor :plan
9
+
6
10
  def initialize
7
11
  super CheckoutSdk::Common::PaymentSourceType::PAYPAL
8
12
  end
@@ -8,7 +8,7 @@ module CheckoutSdk
8
8
  # @return [String]
9
9
  # @!attribute billing_descriptor
10
10
  # @return [String]
11
- class PostFinanceSource < PaymentRequestSource
11
+ class PostFinanceSource < PaymentSource
12
12
  attr_accessor :payment_country,
13
13
  :account_holder_name,
14
14
  :billing_descriptor
@@ -10,7 +10,7 @@ module CheckoutSdk
10
10
  # @return [String]
11
11
  # @!attribute national_id
12
12
  # @return [String]
13
- class QPaySource < PaymentRequestSource
13
+ class QPaySource < PaymentSource
14
14
  attr_accessor :quantity,
15
15
  :description,
16
16
  :language,
@@ -6,7 +6,7 @@ module CheckoutSdk
6
6
  # @return [String] {CheckoutSdk::Common::Country}
7
7
  # @!attribute languageCode
8
8
  # @return [String]
9
- class SofortSource < PaymentRequestSource
9
+ class SofortSource < PaymentSource
10
10
  attr_accessor :countryCode,
11
11
  :languageCode
12
12
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
- class StcPaySource < PaymentRequestSource
5
+ class StcPaySource < PaymentSource
6
6
  def initialize
7
7
  super CheckoutSdk::Common::PaymentSourceType::STCPAY
8
8
  end
@@ -4,7 +4,7 @@ module CheckoutSdk
4
4
  module Payments
5
5
  # @!attribute billing_address
6
6
  # @return [CheckoutSdk::Common::Address]
7
- class TamaraSource < PaymentRequestSource
7
+ class TamaraSource < PaymentSource
8
8
  attr_accessor :billing_address
9
9
 
10
10
  def initialize
@@ -4,7 +4,7 @@ module CheckoutSdk
4
4
  module Payments
5
5
  # @!attribute billing_address
6
6
  # @return [CheckoutSdk::Common::Address]
7
- class WeChatPaySource < PaymentRequestSource
7
+ class WeChatPaySource < PaymentSource
8
8
  attr_accessor :billing_address
9
9
 
10
10
  def initialize
@@ -14,7 +14,7 @@ module CheckoutSdk
14
14
  # @return [String]
15
15
  # @!attribute account_holder
16
16
  # @return [CheckoutSdk::Common::AccountHolder]
17
- class BankAccountSource < PaymentRequestSource
17
+ class BankAccountSource < PaymentSource
18
18
  attr_accessor :payment_method,
19
19
  :account_type,
20
20
  :country,
@@ -20,7 +20,7 @@ module CheckoutSdk
20
20
  # @return [String] {CheckoutSdk::Common::Address}
21
21
  # @!attribute phone
22
22
  # @return [String] {CheckoutSdk::Common::Phone}
23
- class CardSource < PaymentRequestSource
23
+ class CardSource < PaymentSource
24
24
  attr_accessor :number,
25
25
  :expiry_month,
26
26
  :expiry_year,
@@ -4,7 +4,7 @@ module CheckoutSdk
4
4
  module Payments
5
5
  # @!attribute id
6
6
  # @return [String]
7
- class CurrencyAccountSource < PayoutRequestSource
7
+ class CurrencyAccountSource < PayoutSource
8
8
  attr_accessor :id
9
9
 
10
10
  def initialize
@@ -8,7 +8,7 @@ module CheckoutSdk
8
8
  # @return [String]
9
9
  # @!attribute payment_method
10
10
  # @return [String]
11
- class IdSource < PaymentRequestSource
11
+ class IdSource < PaymentSource
12
12
  attr_accessor :id,
13
13
  :cvv,
14
14
  :payment_method
@@ -24,7 +24,7 @@ module CheckoutSdk
24
24
  # @return [CheckoutSdk::Common::Address]
25
25
  # @!attribute phone
26
26
  # @return [CheckoutSdk::Common::Phone]
27
- class NetworkTokenSource < PaymentRequestSource
27
+ class NetworkTokenSource < PaymentSource
28
28
  attr_accessor :token,
29
29
  :expiry_month,
30
30
  :expiry_year,