checkout_sdk 1.0.0.beta.1 → 1.0.0.beta.2

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 (89) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -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 +11 -20
  35. data/lib/checkout_sdk/checkout_api.rb +28 -2
  36. data/lib/checkout_sdk/checkout_configuration.rb +6 -4
  37. data/lib/checkout_sdk/checkout_oauth_sdk_builder.rb +3 -1
  38. data/lib/checkout_sdk/checkout_static_keys_sdk_builder.rb +2 -1
  39. data/lib/checkout_sdk/checkout_utils.rb +15 -0
  40. data/lib/checkout_sdk/common/common.rb +1 -1
  41. data/lib/checkout_sdk/common/file_request.rb +5 -2
  42. data/lib/checkout_sdk/common/product.rb +17 -0
  43. data/lib/checkout_sdk/instruments/create/instrument.rb +2 -0
  44. data/lib/checkout_sdk/instruments/update/update_instrument.rb +2 -0
  45. data/lib/checkout_sdk/oauth_scopes.rb +2 -0
  46. data/lib/checkout_sdk/oauth_sdk_credentials.rb +5 -13
  47. data/lib/checkout_sdk/payments/base_payments_client.rb +5 -0
  48. data/lib/checkout_sdk/payments/billing_information.rb +14 -0
  49. data/lib/checkout_sdk/payments/hosted/hosted_payments_client.rb +25 -0
  50. data/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +87 -0
  51. data/lib/checkout_sdk/payments/links/payment_link.rb +84 -0
  52. data/lib/checkout_sdk/payments/links/payments_links_client.rb +25 -0
  53. data/lib/checkout_sdk/payments/payment_type.rb +0 -1
  54. data/lib/checkout_sdk/payments/payments.rb +12 -1
  55. data/lib/checkout_sdk/payments/payments_query_filter.rb +17 -0
  56. data/lib/checkout_sdk/payments/previous/source/payment_source.rb +1 -0
  57. data/lib/checkout_sdk/payments/sender/corporate_sender.rb +1 -1
  58. data/lib/checkout_sdk/payments/sender/government_sender.rb +1 -1
  59. data/lib/checkout_sdk/payments/sender/individual_sender.rb +1 -1
  60. data/lib/checkout_sdk/payments/source/card_source.rb +2 -2
  61. data/lib/checkout_sdk/payments/source/customer_source.rb +15 -0
  62. data/lib/checkout_sdk/payments/source/payment_source.rb +1 -0
  63. data/lib/checkout_sdk/payments/three_ds_request.rb +3 -0
  64. data/lib/checkout_sdk/previous/checkout_api.rb +8 -0
  65. data/lib/checkout_sdk/previous/checkout_previous_static_keys_sdk_builder.rb +2 -1
  66. data/lib/checkout_sdk/reports/reports.rb +4 -0
  67. data/lib/checkout_sdk/reports/reports_client.rb +26 -0
  68. data/lib/checkout_sdk/reports/reports_query.rb +23 -0
  69. data/lib/checkout_sdk/tokens/card_token_request.rb +2 -2
  70. data/lib/checkout_sdk/version.rb +1 -1
  71. data/lib/checkout_sdk/workflows/create_workflow.rb +20 -0
  72. data/lib/checkout_sdk/workflows/entity_workflow_condition.rb +15 -0
  73. data/lib/checkout_sdk/workflows/event_workflow_condition.rb +15 -0
  74. data/lib/checkout_sdk/workflows/patch_workflow.rb +14 -0
  75. data/lib/checkout_sdk/workflows/processing_channel_workflow_condition.rb +15 -0
  76. data/lib/checkout_sdk/workflows/reflow.rb +11 -0
  77. data/lib/checkout_sdk/workflows/reflow_by_events.rb +11 -0
  78. data/lib/checkout_sdk/workflows/reflow_by_subjects.rb +11 -0
  79. data/lib/checkout_sdk/workflows/webhook_signature.rb +14 -0
  80. data/lib/checkout_sdk/workflows/webhook_workflow_action.rb +21 -0
  81. data/lib/checkout_sdk/workflows/workflow_action.rb +19 -0
  82. data/lib/checkout_sdk/workflows/workflow_action_type.rb +9 -0
  83. data/lib/checkout_sdk/workflows/workflow_condition.rb +19 -0
  84. data/lib/checkout_sdk/workflows/workflow_condition_type.rb +11 -0
  85. data/lib/checkout_sdk/workflows/workflows.rb +18 -0
  86. data/lib/checkout_sdk/workflows/workflows_client.rb +115 -0
  87. data/lib/checkout_sdk.rb +3 -0
  88. metadata +58 -3
  89. data/lib/checkout_sdk/common/abstract_file_request.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0d976eb888dbeda40a8ece1c8701d3ba7c1cec555699c5953b425c092a3d9b9
4
- data.tar.gz: 44ae834bdb42d042f082030b87137261be0a48188d33f8b6c1864e96ea215787
3
+ metadata.gz: 4986ebc42cf3d03320a66dcaaed808ab1bac043d80cfaa6a67ecc4ba3412fab5
4
+ data.tar.gz: 954c730bb43ea3cb5b48479879ef602d87312dbbf182ae0d03e97b14b4ecdccb
5
5
  SHA512:
6
- metadata.gz: f6a38b94c47462ec0837b57be1ac13c4c916acf8eb2360126f9ef4b3a93667fe281ceb0945209ff51d6d72edde1ca1e4596166a75044cdeb3f5a6c5808d48042
7
- data.tar.gz: 270e249ce92268f2346f4da01b3a79e83148ff871a8584844db05fdf60ef786fc6051c22f58d94d3d314e800760d5207d7a43b223b307c261638cb3f20bd28af
6
+ metadata.gz: 8ab5a0ca6991b63ce2eac3d8084009d4fe9e465908db604c795e6f7c5f53c0b64fbc6b45fb7d29aeaacb604e49a8f5d0c2d8f04522bf1fe3db7e7139b42a80de
7
+ data.tar.gz: c19f5b743b9b51c8f375c980d018b30461aeabee0ae4a5d57536374360cb465aad61d355dd70a30d03e39c6f66ec0f1530aa31938991fb1bfd6d632a30cfb744
data/.rubocop.yml CHANGED
@@ -22,6 +22,9 @@ Metrics/ParameterLists:
22
22
  Metrics/ClassLength:
23
23
  Max: 110
24
24
 
25
+ Metrics/CyclomaticComplexity:
26
+ Max: 8
27
+
25
28
  Style/Documentation:
26
29
  Enabled: false
27
30
 
data/README.md CHANGED
@@ -113,6 +113,63 @@ All the API responses that do not fall in the 2** status codes will cause a `Che
113
113
  exception
114
114
  encapsulates the `http_metadata` and a map of `error_details`, if available.
115
115
 
116
+ ## Custom Http Client
117
+
118
+ Ruby SDK supports your own configuration for `http client` using `Faraday::Connection` object, you can pass
119
+ through the
120
+ SDK instantiation as follows:
121
+
122
+ ```ruby
123
+ http_client = Faraday.new do |conn|
124
+ conn.options.timeout = 10
125
+ conn.proxy "http://localhost:8080"
126
+ end
127
+
128
+ api = CheckoutSdk.builder
129
+ .static_keys
130
+ .with_secret_key('secret_key')
131
+ .with_public_key('public_key') # optional, only required for operations related with tokens
132
+ .with_environment(CheckoutSdk::Environment.sandbox)
133
+ .with_http_client(http_client)
134
+ .build
135
+ ```
136
+
137
+ You don't need to specify the URL for Faraday constructor the SDK grabs the belong URI from `CheckoutSdk::Environment`
138
+ however if you want to
139
+ use specific URI's without a proxy you can create the `Environment` object as follows.
140
+
141
+ ```ruby
142
+ environment = CheckoutSdk::Environment.new('https://the.base.uri/', # the uri for all CKO operations
143
+ 'https://the.oauth.uri/connect/token', # the uri used for OAUTH authorization, only required for OAuth operations
144
+ 'https://the.files.uri/', # the uri used for Files operations, only required for Accounts module
145
+ 'https://the.transfers.uri/', # the uri used for Transfer operations, only required for Transfers module
146
+ 'https://the.balances.uri/', # the uri used for Balances operations, only required for Balances module
147
+ false)
148
+ ```
149
+
150
+ If you want to provide your own `http client` and wants to use the `upload_file` functionality from `Disputes` or `Accounts` modules, you
151
+ also need to specify the custom `http client` for `multipart requests`:
152
+
153
+ ```ruby
154
+ http_client = Faraday.new do |conn|
155
+ conn.options.timeout = 10
156
+ conn.proxy "http://localhost:8080"
157
+ end
158
+
159
+ multipart_client = Faraday.new do |f|
160
+ f.request :multipart
161
+ end
162
+
163
+ api = CheckoutSdk.builder
164
+ .static_keys
165
+ .with_secret_key('secret_key')
166
+ .with_public_key('public_key') # optional, only required for operations related with tokens
167
+ .with_environment(CheckoutSdk::Environment.sandbox)
168
+ .with_http_client(http_client)
169
+ .with_multipart_http_client(multipart_client)
170
+ .build
171
+ ```
172
+
116
173
  ## Building from source
117
174
 
118
175
  Once you check out the code from GitHub, the project can be built using gem:
@@ -5,8 +5,10 @@ module CheckoutSdk
5
5
  # @!attribute environment
6
6
  # @return [Environment]
7
7
  # @!attribute http_client
8
- # @return [Object]
9
- attr_accessor :environment, :http_client
8
+ # @return [Faraday::Connection]
9
+ # @!attribute multipart_http_client
10
+ # @return [Faraday::Connection]
11
+ attr_accessor :environment, :http_client, :multipart_http_client
10
12
 
11
13
  # @param [Environment] environment
12
14
  def with_environment(environment)
@@ -14,15 +16,34 @@ module CheckoutSdk
14
16
  self
15
17
  end
16
18
 
19
+ # @param [Faraday::Connection] http_client
17
20
  def with_http_client(http_client)
18
21
  @http_client = http_client
19
22
  self
20
23
  end
21
24
 
25
+ # @param [Faraday::Connection] multipart_http_client
26
+ def with_multipart_http_client(multipart_http_client)
27
+ @multipart_http_client = multipart_http_client
28
+ self
29
+ end
30
+
22
31
  def build
23
32
  with_environment(Environment.sandbox) if environment.nil?
24
- raise CheckoutArgumentException, 'HttpClient must be an instance of Faraday::Connection' \
25
- if !http_client.nil? && !@http_client.instance_of?(Faraday::Connection)
33
+ if http_client.nil?
34
+ @http_client = CheckoutUtils.build_default_client
35
+ else
36
+ unless @http_client.instance_of?(Faraday::Connection)
37
+ raise CheckoutArgumentException, 'http_client must be an instance of Faraday::Connection'
38
+ end
39
+ end
40
+ if multipart_http_client.nil?
41
+ @multipart_http_client = CheckoutUtils.build_multipart_client
42
+ else
43
+ unless @multipart_http_client.instance_of?(Faraday::Connection)
44
+ raise CheckoutArgumentException, 'multipart_http_client must be an instance of Faraday::Connection'
45
+ end
46
+ end
26
47
  end
27
48
  end
28
49
  end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute type
6
+ # @return [String] {CheckoutSdk::Common::AccountHolderType}
7
+ # @!attribute tax_id
8
+ # @return [String]
9
+ # @!attribute date_of_birth
10
+ # @return [DateOfBirth]
11
+ # @!attribute country_of_birth
12
+ # @return [String] {CheckoutSdk::Common::Country}
13
+ # @!attribute residential_status
14
+ # @return [String]
15
+ # @!attribute billing_address
16
+ # @return [CheckoutSdk::Common::Address]
17
+ # @!attribute phone
18
+ # @return [Phone]
19
+ # @!attribute identification
20
+ # @return [CheckoutSdk::Common::AccountHolderIdentification]
21
+ # @!attribute email
22
+ # @return [String]
23
+ class AccountHolder
24
+ attr_accessor :type,
25
+ :tax_id,
26
+ :date_of_birth,
27
+ :country_of_birth,
28
+ :residential_status,
29
+ :billing_address,
30
+ :phone,
31
+ :identification,
32
+ :email
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'checkout_sdk/accounts/update_schedule'
4
+ require 'checkout_sdk/accounts/instrument_document'
5
+ require 'checkout_sdk/accounts/schedule_frequency_type'
6
+ require 'checkout_sdk/accounts/identification'
7
+ require 'checkout_sdk/accounts/document'
8
+ require 'checkout_sdk/accounts/individual'
9
+ require 'checkout_sdk/accounts/business_type'
10
+ require 'checkout_sdk/accounts/account_holder'
11
+ require 'checkout_sdk/accounts/entity_financial_details'
12
+ require 'checkout_sdk/accounts/file_request'
13
+ require 'checkout_sdk/accounts/date_of_birth'
14
+ require 'checkout_sdk/accounts/onboard_entity'
15
+ require 'checkout_sdk/accounts/representative'
16
+ require 'checkout_sdk/accounts/place_of_birth'
17
+ require 'checkout_sdk/accounts/payment_instrument'
18
+ require 'checkout_sdk/accounts/entity_document'
19
+ require 'checkout_sdk/accounts/profile'
20
+ require 'checkout_sdk/accounts/accounts_client'
21
+ require 'checkout_sdk/accounts/entity_financial_documents'
22
+ require 'checkout_sdk/accounts/document_type'
23
+ require 'checkout_sdk/accounts/company'
24
+ require 'checkout_sdk/accounts/phone'
25
+ require 'checkout_sdk/accounts/contact_details'
26
+ require 'checkout_sdk/accounts/entity_email_addresses'
27
+ require 'checkout_sdk/accounts/schedule_request'
28
+ require 'checkout_sdk/accounts/schedule_frequency_weekly'
29
+ require 'checkout_sdk/accounts/schedule_frequency_daily'
30
+ require 'checkout_sdk/accounts/schedule_frequency_monthly'
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ class AccountsClient < Client
6
+ attr_reader :files_client
7
+
8
+ ACCOUNTS = 'accounts'
9
+ ENTITIES = 'entities'
10
+ INSTRUMENT = 'instruments'
11
+ PAYOUT_SCHEDULE = 'payout-schedules'
12
+ FILES = 'files'
13
+ private_constant :ACCOUNTS, :ENTITIES, :INSTRUMENT, :PAYOUT_SCHEDULE, :FILES
14
+
15
+ # @param [ApiClient] api_client
16
+ # @param [ApiClient] files_client
17
+ # @param [CheckoutConfiguration] configuration
18
+ def initialize(api_client, files_client, configuration)
19
+ super(api_client, configuration, CheckoutSdk::AuthorizationType::OAUTH)
20
+ @files_client = files_client
21
+ end
22
+
23
+ # @param [OnboardEntity] entity_request
24
+ def create_entity(entity_request)
25
+ api_client.invoke_post(build_path(ACCOUNTS, ENTITIES), sdk_authorization, entity_request)
26
+ end
27
+
28
+ # @param [String] entity_id
29
+ def get_entity(entity_id)
30
+ api_client.invoke_get(build_path(ACCOUNTS, ENTITIES, entity_id), sdk_authorization)
31
+ end
32
+
33
+ # @param [String] entity_id
34
+ # @param [OnboardEntity] entity_request
35
+ def update_entity(entity_id, entity_request)
36
+ api_client.invoke_put(build_path(ACCOUNTS, ENTITIES, entity_id), sdk_authorization, entity_request)
37
+ end
38
+
39
+ # @param [String] entity_id
40
+ # @param [PaymentInstrument] payment_instrument
41
+ def create_payment_instrument(entity_id, payment_instrument)
42
+ api_client.invoke_post(build_path(ACCOUNTS, ENTITIES, entity_id, INSTRUMENT), sdk_authorization,
43
+ payment_instrument)
44
+ end
45
+
46
+ # @param [String] entity_id
47
+ # @param [String] currency {CheckoutSdk::Common::Currency}
48
+ # @param [UpdateSchedule] update_schedule
49
+ def update_payout_schedule(entity_id, currency, update_schedule)
50
+ api_client.invoke_put(build_path(ACCOUNTS, ENTITIES, entity_id, PAYOUT_SCHEDULE), sdk_authorization,
51
+ { currency => update_schedule })
52
+ end
53
+
54
+ # @param [String] entity_id
55
+ def retrieve_payout_schedule(entity_id)
56
+ api_client.invoke_get(build_path(ACCOUNTS, ENTITIES, entity_id, PAYOUT_SCHEDULE), sdk_authorization)
57
+ end
58
+
59
+ # @param [FileRequest] file_request
60
+ def upload_file(file_request)
61
+ files_client.submit_file(FILES, sdk_authorization, file_request)
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ module BusinessType
6
+ GENERAL_PARTNERSHIP = 'general_partnership'
7
+ LIMITED_PARTNERSHIP = 'limited_partnership'
8
+ PUBLIC_LIMITED_COMPANY = 'public_limited_company'
9
+ LIMITED_COMPANY = 'limited_company'
10
+ PROFESSIONAL_ASSOCIATION = 'professional_association'
11
+ UNINCORPORATED_ASSOCIATION = 'unincorporated_association'
12
+ AUTO_ENTREPRENEUR = 'auto_entrepreneur'
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute business_registration_number
6
+ # @return [String]
7
+ # @!attribute business_type
8
+ # @return [String] {BusinessType}
9
+ # @!attribute legal_name
10
+ # @return [String]
11
+ # @!attribute trading_name
12
+ # @return [String]
13
+ # @!attribute principal_address
14
+ # @return [CheckoutSdk::Common::Address]
15
+ # @!attribute registered_address
16
+ # @return [CheckoutSdk::Common::Address]
17
+ # @!attribute representatives
18
+ # @return [Array(Representative)]
19
+ # @!attribute document
20
+ # @return [EntityDocument]
21
+ # @!attribute financial_details
22
+ # @return [EntityFinancialDetails]
23
+ class Company
24
+ attr_accessor :business_registration_number,
25
+ :business_type,
26
+ :legal_name,
27
+ :trading_name,
28
+ :principal_address,
29
+ :registered_address,
30
+ :representatives,
31
+ :document,
32
+ :financial_details
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute phone
6
+ # @return [Phone]
7
+ # @!attribute email_addresses
8
+ # @return [EntityEmailAddresses]
9
+ class ContactDetails
10
+ attr_accessor :phone,
11
+ :email_addresses
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute day
6
+ # @return [Integer]
7
+ # @!attribute month
8
+ # @return [Integer]
9
+ # @!attribute year
10
+ # @return [Integer]
11
+ class DateOfBirth
12
+ attr_accessor :day,
13
+ :month,
14
+ :year
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute type
6
+ # @return [String] {DocumentType}
7
+ # @!attribute front
8
+ # @return [String]
9
+ # @!attribute back
10
+ # @return [String]
11
+ class Document
12
+ attr_accessor :type,
13
+ :front,
14
+ :back
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ module DocumentType
6
+ PASSPORT = 'passport'
7
+ NATIONAL_IDENTITY_CARD = 'national_identity_card'
8
+ DRIVING_LICENSE = 'driving_license'
9
+ CITIZEN_CARD = 'citizen_card'
10
+ RESIDENCE_PERMIT = 'residence_permit'
11
+ ELECTORAL_ID = 'electoral_id'
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute type
6
+ # @return [String]
7
+ # @!attribute file_id
8
+ # @return [String]
9
+ class EntityDocument
10
+ attr_accessor :type,
11
+ :file_id
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute primary
6
+ # @return [String]
7
+ class EntityEmailAddresses
8
+ attr_accessor :primary
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute annual_processing_volume
6
+ # @return [Integer]
7
+ # @!attribute average_transaction_value
8
+ # @return [Integer]
9
+ # @!attribute highest_transaction_value
10
+ # @return [Integer]
11
+ # @!attribute documents
12
+ # @return [EntityFinancialDocuments]
13
+ class EntityFinancialDetails
14
+ attr_accessor :annual_processing_volume,
15
+ :average_transaction_value,
16
+ :highest_transaction_value,
17
+ :documents
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute bank_statement
6
+ # @return [EntityDocument]
7
+ # @!attribute financial_statement
8
+ # @return [EntityDocument]
9
+ class EntityFinancialDocuments
10
+ attr_accessor :bank_statement,
11
+ :financial_statement
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ class FileRequest < CheckoutSdk::Common::FileRequest
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute national_id_number
6
+ # @return [String]
7
+ # @!attribute document
8
+ # @return [Document]
9
+ class Identification
10
+ attr_accessor :national_id_number,
11
+ :document
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute first_name
6
+ # @return [String]
7
+ # @!attribute middle_name
8
+ # @return [String]
9
+ # @!attribute last_name
10
+ # @return [String]
11
+ # @!attribute legal_name
12
+ # @return [String]
13
+ # @!attribute trading_name
14
+ # @return [String]
15
+ # @!attribute national_tax_id
16
+ # @return [String]
17
+ # @!attribute registered_address
18
+ # @return [CheckoutSdk::Common::Address]
19
+ # @!attribute date_of_birth
20
+ # @return [DateOfBirth]
21
+ # @!attribute place_of_birth
22
+ # @return [PlaceOfBirth]
23
+ # @!attribute identification
24
+ # @return [Identification]
25
+ class Individual
26
+ attr_accessor :first_name,
27
+ :middle_name,
28
+ :last_name,
29
+ :legal_name,
30
+ :trading_name,
31
+ :national_tax_id,
32
+ :registered_address,
33
+ :date_of_birth,
34
+ :place_of_birth,
35
+ :identification
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute type
6
+ # @return [String]
7
+ # @!attribute file_id
8
+ # @return [String]
9
+ class InstrumentDocument
10
+ attr_accessor :type,
11
+ :file_id
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute reference
6
+ # @return [String]
7
+ # @!attribute contact_details
8
+ # @return [ContactDetails]
9
+ # @!attribute profile
10
+ # @return [Profile]
11
+ # @!attribute company
12
+ # @return [Company]
13
+ # @!attribute individual
14
+ # @return [Individual]
15
+ class OnboardEntity
16
+ attr_accessor :reference,
17
+ :contact_details,
18
+ :profile,
19
+ :company,
20
+ :individual
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute type
6
+ # @return [String] {CheckoutSdk::Common::InstrumentType}
7
+ # @!attribute label
8
+ # @return [String]
9
+ # @!attribute account_type
10
+ # @return [String] {CheckoutSdk::Common::AccountType}
11
+ # @!attribute account_number
12
+ # @return [String]
13
+ # @!attribute bank_code
14
+ # @return [String]
15
+ # @!attribute branch_code
16
+ # @return [String]
17
+ # @!attribute iban
18
+ # @return [String]
19
+ # @!attribute bban
20
+ # @return [String]
21
+ # @!attribute swift_bic
22
+ # @return [String]
23
+ # @!attribute currency
24
+ # @return [String] {CheckoutSdk::Common::Currency}
25
+ # @!attribute country
26
+ # @return [String] {CheckoutSdk::Common::Country}
27
+ # @!attribute document
28
+ # @return [InstrumentDocument]
29
+ # @!attribute bank
30
+ # @return [BankDetails]
31
+ # @!attribute account_holder
32
+ # @return [AccountHolder]
33
+ class PaymentInstrument
34
+ attr_accessor :type,
35
+ :label,
36
+ :account_type,
37
+ :account_number,
38
+ :bank_code,
39
+ :branch_code,
40
+ :iban,
41
+ :bban,
42
+ :swift_bic,
43
+ :currency,
44
+ :country,
45
+ :document,
46
+ :bank,
47
+ :account_holder
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute number
6
+ # @return [String]
7
+ class Phone
8
+ attr_accessor :number
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute country
6
+ # @return [String] {CheckoutSdk::Common::Country}
7
+ class PlaceOfBirth
8
+ attr_accessor :country
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute urls
6
+ # @return [Array(String)]
7
+ # @!attribute mccs
8
+ # @return [Array(String)]
9
+ # @!attribute default_holding_currency
10
+ # @return [String] {CheckoutSdk::Common::Currency}
11
+ class Profile
12
+ attr_accessor :urls,
13
+ :mccs,
14
+ :default_holding_currency
15
+ end
16
+ end
17
+ end