checkout_sdk 1.0.0.beta.0 → 1.0.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +6 -0
  3. data/README.md +57 -0
  4. data/lib/checkout_sdk/abstract_checkout_sdk_builder.rb +25 -4
  5. data/lib/checkout_sdk/accounts/account_holder.rb +35 -0
  6. data/lib/checkout_sdk/accounts/accounts.rb +30 -0
  7. data/lib/checkout_sdk/accounts/accounts_client.rb +65 -0
  8. data/lib/checkout_sdk/accounts/business_type.rb +15 -0
  9. data/lib/checkout_sdk/accounts/company.rb +35 -0
  10. data/lib/checkout_sdk/accounts/contact_details.rb +14 -0
  11. data/lib/checkout_sdk/accounts/date_of_birth.rb +17 -0
  12. data/lib/checkout_sdk/accounts/document.rb +17 -0
  13. data/lib/checkout_sdk/accounts/document_type.rb +14 -0
  14. data/lib/checkout_sdk/accounts/entity_document.rb +14 -0
  15. data/lib/checkout_sdk/accounts/entity_email_addresses.rb +11 -0
  16. data/lib/checkout_sdk/accounts/entity_financial_details.rb +20 -0
  17. data/lib/checkout_sdk/accounts/entity_financial_documents.rb +14 -0
  18. data/lib/checkout_sdk/accounts/file_request.rb +8 -0
  19. data/lib/checkout_sdk/accounts/identification.rb +14 -0
  20. data/lib/checkout_sdk/accounts/individual.rb +38 -0
  21. data/lib/checkout_sdk/accounts/instrument_document.rb +14 -0
  22. data/lib/checkout_sdk/accounts/onboard_entity.rb +23 -0
  23. data/lib/checkout_sdk/accounts/payment_instrument.rb +50 -0
  24. data/lib/checkout_sdk/accounts/phone.rb +11 -0
  25. data/lib/checkout_sdk/accounts/place_of_birth.rb +11 -0
  26. data/lib/checkout_sdk/accounts/profile.rb +17 -0
  27. data/lib/checkout_sdk/accounts/representative.rb +35 -0
  28. data/lib/checkout_sdk/accounts/schedule_frequency_daily.rb +11 -0
  29. data/lib/checkout_sdk/accounts/schedule_frequency_monthly.rb +15 -0
  30. data/lib/checkout_sdk/accounts/schedule_frequency_type.rb +11 -0
  31. data/lib/checkout_sdk/accounts/schedule_frequency_weekly.rb +15 -0
  32. data/lib/checkout_sdk/accounts/schedule_request.rb +19 -0
  33. data/lib/checkout_sdk/accounts/update_schedule.rb +17 -0
  34. data/lib/checkout_sdk/api_client.rb +17 -22
  35. data/lib/checkout_sdk/apm/apm.rb +0 -1
  36. data/lib/checkout_sdk/apm/previous/klarna/credit_session_request.rb +19 -21
  37. data/lib/checkout_sdk/apm/previous/klarna/klarna.rb +13 -15
  38. data/lib/checkout_sdk/apm/previous/klarna/klarna_client.rb +43 -45
  39. data/lib/checkout_sdk/apm/previous/klarna/klarna_product.rb +19 -21
  40. data/lib/checkout_sdk/apm/previous/klarna/order_capture_request.rb +24 -26
  41. data/lib/checkout_sdk/apm/previous/sepa/sepa_client.rb +25 -27
  42. data/lib/checkout_sdk/checkout_api.rb +28 -2
  43. data/lib/checkout_sdk/checkout_configuration.rb +6 -4
  44. data/lib/checkout_sdk/checkout_oauth_sdk_builder.rb +3 -1
  45. data/lib/checkout_sdk/checkout_static_keys_sdk_builder.rb +2 -1
  46. data/lib/checkout_sdk/checkout_utils.rb +28 -4
  47. data/lib/checkout_sdk/common/account_holder.rb +4 -1
  48. data/lib/checkout_sdk/common/common.rb +3 -1
  49. data/lib/checkout_sdk/common/file_request.rb +5 -2
  50. data/lib/checkout_sdk/common/marketplace_data.rb +14 -0
  51. data/lib/checkout_sdk/common/payment_source_type.rb +1 -0
  52. data/lib/checkout_sdk/common/product.rb +17 -0
  53. data/lib/checkout_sdk/common/shipping_info.rb +29 -0
  54. data/lib/checkout_sdk/customers/customer_request.rb +2 -2
  55. data/lib/checkout_sdk/disputes/disputes_client.rb +5 -0
  56. data/lib/checkout_sdk/disputes/disputes_query_filter.rb +3 -3
  57. data/lib/checkout_sdk/instruments/base_instruments_client.rb +20 -0
  58. data/lib/checkout_sdk/instruments/{update/update_instrument_request.rb → create/instrument.rb} +3 -1
  59. data/lib/checkout_sdk/instruments/create/{instrument_bank_account_request.rb → instrument_bank_account.rb} +1 -1
  60. data/lib/checkout_sdk/instruments/create/{instrument_token_request.rb → instrument_token.rb} +1 -1
  61. data/lib/checkout_sdk/instruments/instruments.rb +14 -7
  62. data/lib/checkout_sdk/instruments/instruments_client.rb +4 -15
  63. data/lib/checkout_sdk/instruments/previous/create/instrument.rb +26 -0
  64. data/lib/checkout_sdk/instruments/previous/instruments_client.rb +28 -0
  65. data/lib/checkout_sdk/instruments/previous/update/update_instrument.rb +25 -0
  66. data/lib/checkout_sdk/instruments/{create/instrument_request.rb → update/update_instrument.rb} +3 -1
  67. data/lib/checkout_sdk/instruments/update/{update_instrument_bank_account_request.rb → update_instrument_bank_account.rb} +1 -1
  68. data/lib/checkout_sdk/instruments/update/{update_instrument_card_request.rb → update_instrument_card.rb} +1 -1
  69. data/lib/checkout_sdk/instruments/update/{update_instrument_token_request.rb → update_instrument_token.rb} +1 -1
  70. data/lib/checkout_sdk/oauth_scopes.rb +2 -0
  71. data/lib/checkout_sdk/oauth_sdk_credentials.rb +5 -13
  72. data/lib/checkout_sdk/payments/base_payments_client.rb +46 -0
  73. data/lib/checkout_sdk/payments/billing_information.rb +14 -0
  74. data/lib/checkout_sdk/payments/billing_plan.rb +17 -0
  75. data/lib/checkout_sdk/payments/billing_plan_type.rb +14 -0
  76. data/lib/checkout_sdk/payments/capture_request.rb +4 -0
  77. data/lib/checkout_sdk/payments/destination/destination.rb +1 -1
  78. data/lib/checkout_sdk/payments/hosted/hosted_payments_client.rb +25 -0
  79. data/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +87 -0
  80. data/lib/checkout_sdk/payments/links/payment_link.rb +84 -0
  81. data/lib/checkout_sdk/payments/links/payments_links_client.rb +25 -0
  82. data/lib/checkout_sdk/payments/payment_request.rb +5 -1
  83. data/lib/checkout_sdk/payments/payment_type.rb +0 -1
  84. data/lib/checkout_sdk/payments/payments.rb +92 -23
  85. data/lib/checkout_sdk/payments/payments_client.rb +1 -36
  86. data/lib/checkout_sdk/payments/payments_query_filter.rb +17 -0
  87. data/lib/checkout_sdk/payments/payout_request.rb +1 -1
  88. data/lib/checkout_sdk/payments/previous/capture_request.rb +19 -0
  89. data/lib/checkout_sdk/payments/previous/destination/card_destination.rb +38 -0
  90. data/lib/checkout_sdk/payments/previous/destination/destination.rb +21 -0
  91. data/lib/checkout_sdk/payments/previous/destination/id_destination.rb +23 -0
  92. data/lib/checkout_sdk/payments/previous/destination/token_destination.rb +29 -0
  93. data/lib/checkout_sdk/payments/previous/fund_transfer_type.rb +17 -0
  94. data/lib/checkout_sdk/payments/previous/payment_request.rb +73 -0
  95. data/lib/checkout_sdk/payments/previous/payments_client.rb +43 -0
  96. data/lib/checkout_sdk/payments/previous/payout_request.rb +70 -0
  97. data/lib/checkout_sdk/payments/previous/source/apm/alipay_source.rb +13 -0
  98. data/lib/checkout_sdk/payments/previous/source/apm/alma_source.rb +23 -0
  99. data/lib/checkout_sdk/payments/previous/source/apm/bancontact_source.rb +26 -0
  100. data/lib/checkout_sdk/payments/previous/source/apm/benefit_pay_source.rb +17 -0
  101. data/lib/checkout_sdk/payments/previous/source/apm/boleto_source.rb +26 -0
  102. data/lib/checkout_sdk/payments/previous/source/apm/eps_source.rb +20 -0
  103. data/lib/checkout_sdk/payments/previous/source/apm/fawry_source.rb +47 -0
  104. data/lib/checkout_sdk/payments/previous/source/apm/giropay_source.rb +32 -0
  105. data/lib/checkout_sdk/payments/previous/source/apm/ideal_source.rb +23 -0
  106. data/lib/checkout_sdk/payments/previous/source/apm/integration_type.rb +12 -0
  107. data/lib/checkout_sdk/payments/previous/source/apm/klarna_source.rb +56 -0
  108. data/lib/checkout_sdk/payments/previous/source/apm/knet_source.rb +38 -0
  109. data/lib/checkout_sdk/payments/previous/source/apm/multi_banco_source.rb +23 -0
  110. data/lib/checkout_sdk/payments/previous/source/apm/oxxo_source.rb +26 -0
  111. data/lib/checkout_sdk/payments/previous/source/apm/p24_source.rb +26 -0
  112. data/lib/checkout_sdk/payments/previous/source/apm/pago_facil_source.rb +26 -0
  113. data/lib/checkout_sdk/payments/previous/source/apm/paypal_source.rb +26 -0
  114. data/lib/checkout_sdk/payments/previous/source/apm/poli_source.rb +13 -0
  115. data/lib/checkout_sdk/payments/previous/source/apm/qpay_source.rb +26 -0
  116. data/lib/checkout_sdk/payments/previous/source/apm/rapi_pago_source.rb +26 -0
  117. data/lib/checkout_sdk/payments/previous/source/apm/sofort_source.rb +20 -0
  118. data/lib/checkout_sdk/payments/previous/source/card_source.rb +41 -0
  119. data/lib/checkout_sdk/payments/previous/source/customer_source.rb +17 -0
  120. data/lib/checkout_sdk/payments/previous/source/d_local_source.rb +41 -0
  121. data/lib/checkout_sdk/payments/previous/source/id_source.rb +20 -0
  122. data/lib/checkout_sdk/payments/previous/source/network_token_source.rb +47 -0
  123. data/lib/checkout_sdk/payments/previous/source/payment_source.rb +21 -0
  124. data/lib/checkout_sdk/payments/previous/source/token_source.rb +26 -0
  125. data/lib/checkout_sdk/payments/processing_settings.rb +15 -0
  126. data/lib/checkout_sdk/payments/sender/corporate_sender.rb +1 -1
  127. data/lib/checkout_sdk/payments/sender/government_sender.rb +1 -1
  128. data/lib/checkout_sdk/payments/sender/individual_sender.rb +1 -1
  129. data/lib/checkout_sdk/payments/sender/sender.rb +2 -2
  130. data/lib/checkout_sdk/payments/source/apm/after_pay_source.rb +1 -1
  131. data/lib/checkout_sdk/payments/source/apm/alipay_plus_source.rb +1 -1
  132. data/lib/checkout_sdk/payments/source/apm/alma_source.rb +15 -0
  133. data/lib/checkout_sdk/payments/source/apm/bancontact_source.rb +1 -1
  134. data/lib/checkout_sdk/payments/source/apm/benefit_source.rb +1 -1
  135. data/lib/checkout_sdk/payments/source/apm/eps_source.rb +1 -1
  136. data/lib/checkout_sdk/payments/source/apm/fawry_product.rb +20 -0
  137. data/lib/checkout_sdk/payments/source/apm/fawry_source.rb +30 -0
  138. data/lib/checkout_sdk/payments/source/apm/giropay_source.rb +1 -1
  139. data/lib/checkout_sdk/payments/source/apm/ideal_source.rb +1 -1
  140. data/lib/checkout_sdk/payments/source/apm/klarna_source.rb +15 -0
  141. data/lib/checkout_sdk/payments/source/apm/knet_source.rb +1 -1
  142. data/lib/checkout_sdk/payments/source/apm/mbway_source.rb +1 -1
  143. data/lib/checkout_sdk/payments/source/apm/multi_banco_source.rb +1 -1
  144. data/lib/checkout_sdk/payments/source/apm/p24_source.rb +1 -1
  145. data/lib/checkout_sdk/payments/source/apm/paypal_source.rb +5 -1
  146. data/lib/checkout_sdk/payments/source/apm/post_finance_source.rb +1 -1
  147. data/lib/checkout_sdk/payments/source/apm/qpay_source.rb +1 -1
  148. data/lib/checkout_sdk/payments/source/apm/sofort_source.rb +1 -1
  149. data/lib/checkout_sdk/payments/source/apm/stcpay_source.rb +1 -1
  150. data/lib/checkout_sdk/payments/source/apm/tamara_source.rb +1 -1
  151. data/lib/checkout_sdk/payments/source/apm/we_chat_pay_source.rb +1 -1
  152. data/lib/checkout_sdk/payments/source/bank_account_source.rb +1 -1
  153. data/lib/checkout_sdk/payments/source/card_source.rb +3 -3
  154. data/lib/checkout_sdk/payments/source/currency_account_source.rb +1 -1
  155. data/lib/checkout_sdk/payments/source/customer_source.rb +15 -0
  156. data/lib/checkout_sdk/payments/source/id_source.rb +1 -1
  157. data/lib/checkout_sdk/payments/source/network_token_source.rb +1 -1
  158. data/lib/checkout_sdk/payments/source/{payment_request_source.rb → payment_source.rb} +2 -1
  159. data/lib/checkout_sdk/payments/source/{payout_request_source.rb → payout_source.rb} +3 -3
  160. data/lib/checkout_sdk/payments/source/provider_token_source.rb +1 -1
  161. data/lib/checkout_sdk/payments/source/token_source.rb +1 -1
  162. data/lib/checkout_sdk/payments/three_ds_request.rb +7 -1
  163. data/lib/checkout_sdk/previous/checkout_api.rb +37 -5
  164. data/lib/checkout_sdk/previous/checkout_previous_static_keys_sdk_builder.rb +2 -1
  165. data/lib/checkout_sdk/reports/reports.rb +4 -0
  166. data/lib/checkout_sdk/reports/reports_client.rb +26 -0
  167. data/lib/checkout_sdk/reports/reports_query.rb +23 -0
  168. data/lib/checkout_sdk/sources/mandate_type.rb +12 -0
  169. data/lib/checkout_sdk/sources/sepa_source_request.rb +20 -0
  170. data/lib/checkout_sdk/sources/source_data.rb +28 -0
  171. data/lib/checkout_sdk/sources/source_request.rb +30 -0
  172. data/lib/checkout_sdk/sources/source_type.rb +11 -0
  173. data/lib/checkout_sdk/sources/sources.rb +9 -0
  174. data/lib/checkout_sdk/sources/sources_client.rb +23 -0
  175. data/lib/checkout_sdk/tokens/card_token_request.rb +2 -2
  176. data/lib/checkout_sdk/tokens/wallet_token_request.rb +1 -1
  177. data/lib/checkout_sdk/version.rb +1 -1
  178. data/lib/checkout_sdk/workflows/create_workflow.rb +20 -0
  179. data/lib/checkout_sdk/workflows/entity_workflow_condition.rb +15 -0
  180. data/lib/checkout_sdk/workflows/event_workflow_condition.rb +15 -0
  181. data/lib/checkout_sdk/workflows/patch_workflow.rb +14 -0
  182. data/lib/checkout_sdk/workflows/processing_channel_workflow_condition.rb +15 -0
  183. data/lib/checkout_sdk/workflows/reflow.rb +11 -0
  184. data/lib/checkout_sdk/workflows/reflow_by_events.rb +11 -0
  185. data/lib/checkout_sdk/workflows/reflow_by_subjects.rb +11 -0
  186. data/lib/checkout_sdk/workflows/webhook_signature.rb +14 -0
  187. data/lib/checkout_sdk/workflows/webhook_workflow_action.rb +21 -0
  188. data/lib/checkout_sdk/workflows/workflow_action.rb +19 -0
  189. data/lib/checkout_sdk/workflows/workflow_action_type.rb +9 -0
  190. data/lib/checkout_sdk/workflows/workflow_condition.rb +19 -0
  191. data/lib/checkout_sdk/workflows/workflow_condition_type.rb +11 -0
  192. data/lib/checkout_sdk/workflows/workflows.rb +18 -0
  193. data/lib/checkout_sdk/workflows/workflows_client.rb +115 -0
  194. data/lib/checkout_sdk.rb +6 -0
  195. metadata +124 -13
  196. data/lib/checkout_sdk/apm/previous/klarna/klarna_shipping_info.rb +0 -33
  197. data/lib/checkout_sdk/common/abstract_file_request.rb +0 -11
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Previous
5
+ module Payments
6
+ class PoliSource < PaymentSource
7
+ def initialize
8
+ super CheckoutSdk::Common::PaymentSourceType::POLI
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -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,21 @@
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
+ # @abstract
14
+ # @param [String] type {CheckoutSdk::Common::PaymentSourceType}
15
+ def initialize(type)
16
+ @type = type
17
+ end
18
+ end
19
+ end
20
+ end
21
+ 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
@@ -5,7 +5,7 @@ module CheckoutSdk
5
5
  # @!attribute company_name
6
6
  # @return [String]
7
7
  # @!attribute address
8
- # @return [String] {CheckoutSdk::Common::Address}
8
+ # @return [CheckoutSdk::Common::Address]
9
9
  # @!attribute reference_type
10
10
  # @return [String]
11
11
  # @!attribute source_of_funds
@@ -5,7 +5,7 @@ module CheckoutSdk
5
5
  # @!attribute company_name
6
6
  # @return [String]
7
7
  # @!attribute address
8
- # @return [String] {CheckoutSdk::Common::Address}
8
+ # @return [CheckoutSdk::Common::Address]
9
9
  # @!attribute reference_type
10
10
  # @return [String]
11
11
  # @!attribute source_of_funds
@@ -7,7 +7,7 @@ module CheckoutSdk
7
7
  # @!attribute last_name
8
8
  # @return [String]
9
9
  # @!attribute address
10
- # @return [String] {CheckoutSdk::Common::Address}
10
+ # @return [CheckoutSdk::Common::Address]
11
11
  # @!attribute identification
12
12
  # @return [CheckoutSdk::Common::AccountHolderIdentification]
13
13
  # @!attribute middle_name
@@ -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,