checkout_sdk 2.5.0 → 2.6.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/accounts.rb +8 -0
- data/lib/checkout_sdk/accounts/accounts_client.rb +35 -9
- data/lib/checkout_sdk/accounts/additional_document.rb +6 -0
- data/lib/checkout_sdk/accounts/additional_info.rb +5 -0
- data/lib/checkout_sdk/accounts/agreed_terms.rb +14 -1
- data/lib/checkout_sdk/accounts/articles_of_association.rb +8 -1
- data/lib/checkout_sdk/accounts/articles_of_association_type.rb +1 -0
- data/lib/checkout_sdk/accounts/bank_verification.rb +8 -1
- data/lib/checkout_sdk/accounts/bank_verification_type.rb +1 -0
- data/lib/checkout_sdk/accounts/business_type.rb +2 -0
- data/lib/checkout_sdk/accounts/certified_authorised_signatory.rb +24 -0
- data/lib/checkout_sdk/accounts/certified_authorised_signatory_type.rb +10 -0
- data/lib/checkout_sdk/accounts/citizenship.rb +6 -1
- data/lib/checkout_sdk/accounts/company.rb +54 -1
- data/lib/checkout_sdk/accounts/company_position.rb +1 -0
- data/lib/checkout_sdk/accounts/company_verification.rb +9 -0
- data/lib/checkout_sdk/accounts/company_verification_type.rb +3 -0
- data/lib/checkout_sdk/accounts/contact_details.rb +18 -0
- data/lib/checkout_sdk/accounts/date_of_birth.rb +10 -0
- data/lib/checkout_sdk/accounts/date_of_incorporation.rb +10 -0
- data/lib/checkout_sdk/accounts/document.rb +12 -0
- data/lib/checkout_sdk/accounts/document_type.rb +1 -0
- data/lib/checkout_sdk/accounts/entity_document.rb +5 -0
- data/lib/checkout_sdk/accounts/entity_email_addresses.rb +12 -1
- data/lib/checkout_sdk/accounts/entity_files_request.rb +4 -3
- data/lib/checkout_sdk/accounts/entity_financial_details.rb +15 -0
- data/lib/checkout_sdk/accounts/entity_financial_documents.rb +5 -0
- data/lib/checkout_sdk/accounts/entity_roles.rb +1 -0
- data/lib/checkout_sdk/accounts/file_purpose.rb +24 -0
- data/lib/checkout_sdk/accounts/file_request.rb +7 -0
- data/lib/checkout_sdk/accounts/financial_statements.rb +9 -1
- data/lib/checkout_sdk/accounts/financial_statements_type.rb +2 -0
- data/lib/checkout_sdk/accounts/financial_verification.rb +11 -3
- data/lib/checkout_sdk/accounts/financial_verification_type.rb +2 -0
- data/lib/checkout_sdk/accounts/identification.rb +7 -0
- data/lib/checkout_sdk/accounts/individual.rb +26 -0
- data/lib/checkout_sdk/accounts/invitee.rb +6 -0
- data/lib/checkout_sdk/accounts/national_id_type.rb +1 -0
- data/lib/checkout_sdk/accounts/onboard_entity.rb +30 -3
- data/lib/checkout_sdk/accounts/onboard_sub_entity_documents.rb +38 -1
- data/lib/checkout_sdk/accounts/phone.rb +7 -1
- data/lib/checkout_sdk/accounts/place_of_birth.rb +4 -0
- data/lib/checkout_sdk/accounts/processing_details.rb +27 -0
- data/lib/checkout_sdk/accounts/processing_details_ach.rb +14 -1
- data/lib/checkout_sdk/accounts/processing_details_payments.rb +3 -1
- data/lib/checkout_sdk/accounts/profile.rb +14 -0
- data/lib/checkout_sdk/accounts/proof_of_legality.rb +8 -1
- data/lib/checkout_sdk/accounts/proof_of_legality_type.rb +1 -0
- data/lib/checkout_sdk/accounts/proof_of_principal_address.rb +10 -3
- data/lib/checkout_sdk/accounts/proof_of_principal_address_type.rb +3 -0
- data/lib/checkout_sdk/accounts/proof_of_registration.rb +22 -0
- data/lib/checkout_sdk/accounts/proof_of_registration_type.rb +11 -0
- data/lib/checkout_sdk/accounts/proof_of_residential_address.rb +22 -0
- data/lib/checkout_sdk/accounts/proof_of_residential_address_type.rb +12 -0
- data/lib/checkout_sdk/accounts/representative.rb +67 -4
- data/lib/checkout_sdk/accounts/representative_documents.rb +43 -0
- data/lib/checkout_sdk/accounts/representative_individual.rb +35 -2
- data/lib/checkout_sdk/accounts/shareholder_structure.rb +9 -1
- data/lib/checkout_sdk/accounts/shareholder_structure_type.rb +1 -0
- data/lib/checkout_sdk/accounts/submitter.rb +4 -3
- data/lib/checkout_sdk/accounts/tax_verification.rb +8 -0
- data/lib/checkout_sdk/accounts/tax_verification_type.rb +1 -0
- data/lib/checkout_sdk/accounts/update_payment_instrument_request.rb +13 -1
- data/lib/checkout_sdk/version.rb +1 -1
- metadata +10 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 643ab11801801b6384afcf53088f20e10fd700aea656dd166f1355fd1f5d445e
|
|
4
|
+
data.tar.gz: ebf1ad17a6f86067c740e66896ea79b49ff2a4433e690e4134f39b89d475bc5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2aec6348780a7fe62a67ff99cfe125a60b17285b4f4704ecdb32f950a218e7b2464124a54e1a485dcd4271ed3f253f7721ba663d638c8c6eb4eec2232201e48
|
|
7
|
+
data.tar.gz: 6107aa6f953cfad64ad7a4c99a05530ee989b27843ebfcf27c4c0c5ce108b96aad2c4b105251a3d74ca68871c87655f373912be6a173da4199c1c03f0ddf9de5
|
|
@@ -81,3 +81,11 @@ require 'checkout_sdk/accounts/representative_individual'
|
|
|
81
81
|
require 'checkout_sdk/accounts/financial_statements'
|
|
82
82
|
require 'checkout_sdk/accounts/financial_statements_type'
|
|
83
83
|
require 'checkout_sdk/accounts/articles_of_association'
|
|
84
|
+
require 'checkout_sdk/accounts/certified_authorised_signatory_type'
|
|
85
|
+
require 'checkout_sdk/accounts/certified_authorised_signatory'
|
|
86
|
+
require 'checkout_sdk/accounts/proof_of_residential_address_type'
|
|
87
|
+
require 'checkout_sdk/accounts/proof_of_residential_address'
|
|
88
|
+
require 'checkout_sdk/accounts/proof_of_registration_type'
|
|
89
|
+
require 'checkout_sdk/accounts/proof_of_registration'
|
|
90
|
+
require 'checkout_sdk/accounts/representative_documents'
|
|
91
|
+
require 'checkout_sdk/accounts/file_purpose'
|
|
@@ -78,13 +78,17 @@ module CheckoutSdk
|
|
|
78
78
|
sdk_authorization)
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
+
# Updates a payment instrument (PATCH /accounts/entities/{entityId}/payment-instruments/{id}).
|
|
82
|
+
# The API reads the ETag only from the If-Match HTTP header and answers 428 without it, so the
|
|
83
|
+
# request's headers.if_match is sent as that header.
|
|
81
84
|
# @param [String] entity_id
|
|
82
85
|
# @param [String] instrument_id
|
|
83
86
|
# @param [Hash, UpdatePaymentInstrumentRequest] update_payment_instrument
|
|
84
87
|
def update_payment_instrument(entity_id, instrument_id, update_payment_instrument)
|
|
85
88
|
api_client.invoke_patch(build_path(ACCOUNTS, ENTITIES, entity_id, PAYMENT_INSTRUMENTS, instrument_id),
|
|
86
89
|
sdk_authorization,
|
|
87
|
-
update_payment_instrument
|
|
90
|
+
update_payment_instrument,
|
|
91
|
+
payment_instrument_headers(update_payment_instrument))
|
|
88
92
|
end
|
|
89
93
|
|
|
90
94
|
# @param [String] entity_id
|
|
@@ -100,7 +104,10 @@ module CheckoutSdk
|
|
|
100
104
|
api_client.invoke_get(build_path(ACCOUNTS, ENTITIES, entity_id, PAYOUT_SCHEDULE), sdk_authorization)
|
|
101
105
|
end
|
|
102
106
|
|
|
103
|
-
#
|
|
107
|
+
# Uploads a file to the Files API (POST /files on the Files host), as a multipart request. The
|
|
108
|
+
# returned ID is what document front and back attributes take.
|
|
109
|
+
# @param [Hash, FileRequest] file_request The file to upload and its {FilePurpose}.
|
|
110
|
+
# @return [Hash] The ID of the uploaded file.
|
|
104
111
|
def upload_file(file_request)
|
|
105
112
|
files_client.submit_file(FILES, sdk_authorization, file_request)
|
|
106
113
|
end
|
|
@@ -216,20 +223,25 @@ module CheckoutSdk
|
|
|
216
223
|
)
|
|
217
224
|
end
|
|
218
225
|
|
|
219
|
-
#
|
|
220
|
-
#
|
|
221
|
-
#
|
|
226
|
+
# Create a file upload scoped to a sub-entity. Hits POST /entities/{entityId}/files on the Files host
|
|
227
|
+
# with a JSON body carrying only the purpose. The file content is not part of this request: send the
|
|
228
|
+
# raw bytes with an HTTP PUT to the returned _links.upload.href.
|
|
229
|
+
# @param [String] entity_id The ID of the sub-entity.
|
|
230
|
+
# @param [Hash, EntityFilesRequest] file_request The {FilePurpose} of the file to upload.
|
|
231
|
+
# @return [Hash] The file ID, the maximum size allowed, the MIME types allowed for the purpose, and the
|
|
232
|
+
# upload link.
|
|
222
233
|
def upload_entity_file(entity_id, file_request)
|
|
223
|
-
files_client.
|
|
234
|
+
files_client.invoke_post(
|
|
224
235
|
build_path(ENTITIES, entity_id, FILES),
|
|
225
236
|
sdk_authorization,
|
|
226
237
|
file_request
|
|
227
238
|
)
|
|
228
239
|
end
|
|
229
240
|
|
|
230
|
-
# Retrieve a file scoped to a sub-entity. Hits GET /entities/{entityId}/files/{fileId}.
|
|
231
|
-
# @param [String] entity_id
|
|
232
|
-
# @param [String] file_id
|
|
241
|
+
# Retrieve a file scoped to a sub-entity. Hits GET /entities/{entityId}/files/{fileId} on the Files host.
|
|
242
|
+
# @param [String] entity_id The ID of the sub-entity.
|
|
243
|
+
# @param [String] file_id The ID of the file.
|
|
244
|
+
# @return [Hash] The file's status, size, MIME type, upload date and purpose.
|
|
233
245
|
def get_entity_file(entity_id, file_id)
|
|
234
246
|
files_client.invoke_get(
|
|
235
247
|
build_path(ENTITIES, entity_id, FILES, file_id),
|
|
@@ -239,6 +251,20 @@ module CheckoutSdk
|
|
|
239
251
|
|
|
240
252
|
private
|
|
241
253
|
|
|
254
|
+
# The If-Match header of a payment instrument update, from an UpdatePaymentInstrumentRequest or
|
|
255
|
+
# a Hash. Returns nil when no ETag was given.
|
|
256
|
+
def payment_instrument_headers(request)
|
|
257
|
+
headers = request.is_a?(Hash) ? (request[:headers] || request['headers']) : request&.headers
|
|
258
|
+
return headers unless headers.is_a?(Hash)
|
|
259
|
+
|
|
260
|
+
etag = headers[:if_match] || headers['if_match'] || headers['if-match']
|
|
261
|
+
return nil if etag.nil?
|
|
262
|
+
|
|
263
|
+
http_headers = CheckoutSdk::Common::Headers.new
|
|
264
|
+
http_headers.if_match = etag
|
|
265
|
+
http_headers
|
|
266
|
+
end
|
|
267
|
+
|
|
242
268
|
# Builds the versioned Accept header for Accounts onboarding operations.
|
|
243
269
|
# @param [String] schema_version
|
|
244
270
|
# @return [CheckoutSdk::Common::Headers]
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Additional space for documents to be provided when requested. Carries a file ID only; the API defines
|
|
6
|
+
# no document type for it.
|
|
5
7
|
# @!attribute front
|
|
8
|
+
# The ID of the front side of the document as represented within Checkout.com systems.
|
|
9
|
+
# [Required]
|
|
10
|
+
# ^file_[a-z2-7]{26}$
|
|
11
|
+
# 31 characters
|
|
6
12
|
# @return [String]
|
|
7
13
|
class AdditionalDocument
|
|
8
14
|
attr_accessor :front
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Not defined by any Accounts API schema.
|
|
6
|
+
# @deprecated Not part of any Accounts API schema; the API does not read it.
|
|
5
7
|
# @!attribute field1
|
|
8
|
+
# @deprecated Not defined by any Accounts API schema.
|
|
6
9
|
# @return [String]
|
|
7
10
|
# @!attribute field2
|
|
11
|
+
# @deprecated Not defined by any Accounts API schema.
|
|
8
12
|
# @return [String]
|
|
9
13
|
# @!attribute field3
|
|
14
|
+
# @deprecated Not defined by any Accounts API schema.
|
|
10
15
|
# @return [String]
|
|
11
16
|
class AdditionalInfo
|
|
12
17
|
attr_accessor :field1,
|
|
@@ -2,16 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
-
#
|
|
5
|
+
# Evidence of consent to Checkout.com onboarding: the person who agreed to the terms and conditions
|
|
6
|
+
# (US ISV Seller variants).
|
|
6
7
|
# @!attribute date
|
|
8
|
+
# Date and time the terms were agreed, in RFC 3339 or ISO 8601 format.
|
|
9
|
+
# [Required]
|
|
10
|
+
# Format: date-time
|
|
7
11
|
# @return [String] Date and time the terms were agreed (RFC 3339 / ISO 8601).
|
|
8
12
|
# @!attribute ip_address
|
|
13
|
+
# IP address (IPv4 or IPv6) of the person at the time they agreed the terms.
|
|
14
|
+
# [Required]
|
|
9
15
|
# @return [String] IP address (IPv4 or IPv6) of the person at the time they agreed.
|
|
10
16
|
# @!attribute name
|
|
17
|
+
# First and last name of the person who agreed to the terms.
|
|
18
|
+
# [Required]
|
|
11
19
|
# @return [String] First and last name of the person who agreed to the terms.
|
|
12
20
|
# @!attribute email
|
|
21
|
+
# Email address of the person who agreed to the terms.
|
|
22
|
+
# [Required]
|
|
23
|
+
# Format: email
|
|
13
24
|
# @return [String] Email address of the person who agreed to the terms.
|
|
14
25
|
# @!attribute version
|
|
26
|
+
# Identifier of the terms version that was agreed.
|
|
27
|
+
# [Required]
|
|
15
28
|
# @return [String] Identifier of the terms version that was agreed.
|
|
16
29
|
class AgreedTerms
|
|
17
30
|
attr_accessor :date,
|
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Memorandum or Articles of Association document.
|
|
5
6
|
# @!attribute type
|
|
6
|
-
#
|
|
7
|
+
# The type of document used.
|
|
8
|
+
# [Required]
|
|
9
|
+
# @return [String] {ArticlesOfAssociationType}
|
|
7
10
|
# @!attribute front
|
|
11
|
+
# The ID of the front side of the document as represented within Checkout.com systems.
|
|
12
|
+
# [Required]
|
|
13
|
+
# ^file_[a-z2-7]{26}$
|
|
14
|
+
# 31 characters
|
|
8
15
|
# @return [String]
|
|
9
16
|
class ArticlesOfAssociation
|
|
10
17
|
attr_accessor :type,
|
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# A document showing transactions from the last 3 months.
|
|
5
6
|
# @!attribute type
|
|
6
|
-
#
|
|
7
|
+
# The type of document being used as bank verification.
|
|
8
|
+
# [Required]
|
|
9
|
+
# @return [String] {BankVerificationType}
|
|
7
10
|
# @!attribute front
|
|
11
|
+
# The ID of the front side of the document as represented within Checkout.com systems.
|
|
12
|
+
# [Required]
|
|
13
|
+
# ^file_[a-z2-7]{26}$
|
|
14
|
+
# 31 characters
|
|
8
15
|
# @return [String]
|
|
9
16
|
class BankVerification
|
|
10
17
|
attr_accessor :type,
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# The legal type of the company. Must be INDIVIDUAL_OR_SOLE_PROPRIETORSHIP for the sole trader variants;
|
|
6
|
+
# which other values a variant accepts depends on the variant.
|
|
5
7
|
module BusinessType
|
|
6
8
|
INDIVIDUAL_OR_SOLE_PROPRIETORSHIP = 'individual_or_sole_proprietorship'
|
|
7
9
|
GENERAL_PARTNERSHIP = 'general_partnership'
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
# Certified authorised signatory document. Required when the legal representative or other role owner
|
|
6
|
+
# is not registered on the certificate of incorporation. Representative documents only
|
|
7
|
+
# (company.representatives[].documents), EEA, GB and US Company Full (3.0) and US ISV Seller Company
|
|
8
|
+
# (3.0).
|
|
9
|
+
# @!attribute type
|
|
10
|
+
# The type of document.
|
|
11
|
+
# [Required]
|
|
12
|
+
# @return [String] {CertifiedAuthorisedSignatoryType}
|
|
13
|
+
# @!attribute front
|
|
14
|
+
# The ID of the front side of the document as represented within Checkout.com systems.
|
|
15
|
+
# [Required]
|
|
16
|
+
# ^file_[a-z2-7]{26}$
|
|
17
|
+
# 31 characters
|
|
18
|
+
# @return [String]
|
|
19
|
+
class CertifiedAuthorisedSignatory
|
|
20
|
+
attr_accessor :type,
|
|
21
|
+
:front
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
# The document type accepted as a representative's certified authorised signatory document.
|
|
6
|
+
module CertifiedAuthorisedSignatoryType
|
|
7
|
+
POWER_OF_ATTORNEY = 'power_of_attorney'
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
-
# A citizenship or legal
|
|
5
|
+
# A citizenship or legal-status record of a representative (US ISV Seller variants).
|
|
6
6
|
# @!attribute type
|
|
7
|
+
# The type of citizenship or legal status (for example citizenship or residency).
|
|
8
|
+
# [Optional]
|
|
7
9
|
# @return [String] The type of citizenship or legal status (e.g. `citizenship`, `residency`).
|
|
8
10
|
# @!attribute country
|
|
11
|
+
# The two-letter ISO 3166-1 alpha-2 country code.
|
|
12
|
+
# [Required]
|
|
13
|
+
# Format: iso-3166-1-alpha-2
|
|
9
14
|
# @return [String] {CheckoutSdk::Common::Country} two-letter ISO 3166-1 alpha-2 code.
|
|
10
15
|
class Citizenship
|
|
11
16
|
attr_accessor :type,
|
|
@@ -2,31 +2,84 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Information about the company represented by the sub-entity: on every company and v3.0 sole trader
|
|
6
|
+
# variant, and as the controlling company of a {Representative} (where only legal_name, trading_name
|
|
7
|
+
# and registered_address apply).
|
|
5
8
|
# @!attribute business_registration_number
|
|
9
|
+
# The sub-entity's business registration number: a Commercial Registration or Ministry of Commerce
|
|
10
|
+
# certificate number, or an equivalent registration number.
|
|
11
|
+
# [Required] for the Full variants and US ISV Seller Company (3.0); [Optional] for the Lite (2.0)
|
|
12
|
+
# variants. Not part of the sole trader variants.
|
|
13
|
+
# The format depends on the variant:
|
|
14
|
+
# EEA: min 2 characters, max 39 characters; a SIRET number for sub-entities based in France.
|
|
15
|
+
# GB (3.0): a Companies House number, 8 characters, matching one of the three alternatives of the
|
|
16
|
+
# spec's pattern, ^(A|B|C)$:
|
|
17
|
+
# A: ((AC|CE|CS|FC|FE|GE|GS|IC|LP|NC|NF|NI|NL|NO|NP|OC|OE|PC|R0|RC|SA|SC|SE|SF|SG|SI|SL|SO|SR|SZ|ZC|\d{2})\d{6})
|
|
18
|
+
# B: ((IP|SP|RS)[A-Z\d]{6})
|
|
19
|
+
# C: (SL\d{5}[\dA])
|
|
20
|
+
# GB (2.0) accepts the same pattern case-insensitively.
|
|
21
|
+
# US: an Employer Identification Number (EIN), ^[0-9]{9}$, 9 characters; US ISV Seller Company (3.0)
|
|
22
|
+
# also accepts the hyphenated form, ^[0-9]{2}-?[0-9]{7}$, min 9 characters, max 11.
|
|
6
23
|
# @return [String]
|
|
7
24
|
# @!attribute business_type
|
|
25
|
+
# The legal type of the company ({BusinessType} values). Must be individual_or_sole_proprietorship for
|
|
26
|
+
# the sole trader variants.
|
|
27
|
+
# [Required], except on EEA and US Company Lite (2.0) where it is [Optional]. Not part of GB Company
|
|
28
|
+
# Full and Lite (2.0).
|
|
8
29
|
# @return [String] {BusinessType}
|
|
9
30
|
# @!attribute legal_name
|
|
31
|
+
# The legal name of the sub-entity.
|
|
32
|
+
# [Required] for every company variant and the controlling company; not part of the sole trader
|
|
33
|
+
# variants.
|
|
34
|
+
# min 2 characters, max 300 characters
|
|
10
35
|
# @return [String]
|
|
11
36
|
# @!attribute trading_name
|
|
37
|
+
# The trading name of the sub-entity, also referred to as 'doing business as'.
|
|
38
|
+
# [Required]
|
|
39
|
+
# min 2 characters, max 300 characters
|
|
12
40
|
# @return [String]
|
|
13
41
|
# @!attribute additional_trading_names
|
|
42
|
+
# The collection of additional trading names for the sub-entity.
|
|
43
|
+
# [Optional] (US ISV Seller variants only)
|
|
14
44
|
# @return [Array(String)]
|
|
15
45
|
# @!attribute is_registered_company
|
|
46
|
+
# Whether the sub-entity is a registered legal entity. Must be false for US ISV Seller Sole Trader
|
|
47
|
+
# (3.0).
|
|
48
|
+
# [Required] for US ISV Seller Sole Trader (3.0); not part of the other variants.
|
|
16
49
|
# @return [Boolean]
|
|
17
50
|
# @!attribute date_of_incorporation
|
|
51
|
+
# The date the company was incorporated, or the date the sole trader started trading.
|
|
52
|
+
# [Required] for every v3.0 variant; [Optional] for EEA, GB and US Company Full (2.0).
|
|
18
53
|
# @return [DateOfIncorporation]
|
|
19
54
|
# @!attribute regulatory_licence_number
|
|
55
|
+
# The regulatory licence number of the company.
|
|
56
|
+
# [Optional] (EEA Company Full (3.0) only)
|
|
57
|
+
# ^[a-zA-Z0-9\-]+$
|
|
58
|
+
# min 4 characters, max 32 characters
|
|
20
59
|
# @return [String]
|
|
21
60
|
# @!attribute principal_address
|
|
61
|
+
# The primary location where business is performed.
|
|
62
|
+
# [Required] for every company and v3.0 sole trader variant.
|
|
22
63
|
# @return [CheckoutSdk::Common::Address]
|
|
23
64
|
# @!attribute registered_address
|
|
65
|
+
# The registered address of the company.
|
|
66
|
+
# [Required] for every company variant and the controlling company; not part of the sole trader
|
|
67
|
+
# variants.
|
|
24
68
|
# @return [CheckoutSdk::Common::Address]
|
|
25
69
|
# @!attribute representatives
|
|
26
|
-
#
|
|
70
|
+
# Information about the representatives of this company.
|
|
71
|
+
# [Required]
|
|
72
|
+
# min 1 item; max 1 item for the sole trader variants (the individual themselves, with roles [ubo]),
|
|
73
|
+
# max 5 on v2.0, max 25 on EEA, GB and US Company Full (3.0), no maximum on US ISV Seller Company
|
|
74
|
+
# (3.0)
|
|
75
|
+
# @return [Array(Representative)]
|
|
27
76
|
# @!attribute document
|
|
77
|
+
# @deprecated Not defined by any Accounts API company schema; the API does not read it.
|
|
28
78
|
# @return [EntityDocument]
|
|
29
79
|
# @!attribute financial_details
|
|
80
|
+
# Seller financial questions.
|
|
81
|
+
# [Required] for EEA and US Company Full (2.0); [Optional] for EEA and US Company Lite (2.0). Not part
|
|
82
|
+
# of the other variants.
|
|
30
83
|
# @return [EntityFinancialDetails]
|
|
31
84
|
class Company
|
|
32
85
|
attr_accessor :business_registration_number,
|
|
@@ -2,9 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# The document to use to confirm the company's identity (certified by a power of attorney within the
|
|
6
|
+
# last 3 months).
|
|
5
7
|
# @!attribute type
|
|
8
|
+
# The type of document used for company verification. articles_of_association is accepted on the US
|
|
9
|
+
# Company (2.0) variants only.
|
|
10
|
+
# [Required]
|
|
6
11
|
# @return [String] {CompanyVerificationType}
|
|
7
12
|
# @!attribute front
|
|
13
|
+
# The ID of the front side of the document as represented within Checkout.com systems.
|
|
14
|
+
# [Required]
|
|
15
|
+
# ^file_[a-z2-7]{26}$
|
|
16
|
+
# 31 characters
|
|
8
17
|
# @return [String]
|
|
9
18
|
class CompanyVerification
|
|
10
19
|
attr_accessor :type,
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# The document types accepted as company verification. ARTICLES_OF_ASSOCIATION is accepted on the US
|
|
6
|
+
# Company (2.0) variants only; articles of association sent as their own document use
|
|
7
|
+
# {ArticlesOfAssociationType} instead.
|
|
5
8
|
module CompanyVerificationType
|
|
6
9
|
INCORPORATION_DOCUMENT = 'incorporation_document'
|
|
7
10
|
ARTICLES_OF_ASSOCIATION = 'articles_of_association'
|
|
@@ -2,11 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Contact details of the sub-entity.
|
|
5
6
|
# @!attribute phone
|
|
7
|
+
# The phone number of the sub-entity.
|
|
8
|
+
# [Required] for every Accounts API v2.0 variant and the US ISV Seller variants; [Optional] for the
|
|
9
|
+
# other v3.0 variants.
|
|
10
|
+
# On v3.0 country_code is required and is the ISO 3166-1 alpha-2 country where the number is registered
|
|
11
|
+
# (for example FR), not the dialling code; v2.0 takes number only. number is the number without the
|
|
12
|
+
# country calling code, and its format depends on the variant:
|
|
13
|
+
# v3.0 EEA: ^[0-9]{6,13}$, min 6 characters, max 13 characters
|
|
14
|
+
# v3.0 GB: ^[0-9]{7,11}$, min 7 characters, max 11 characters
|
|
15
|
+
# v3.0 US and US ISV Seller: ^[1-9][0-9]{9,16}$, min 10 characters, max 16 characters
|
|
16
|
+
# v2.0: ^[1-9][0-9]{7,15}$, min 8 characters, max 16 characters; on the US v2.0 variants
|
|
17
|
+
# ^[2-9]{1}[0-9]{9,15}$, min 10 characters
|
|
6
18
|
# @return [Phone]
|
|
7
19
|
# @!attribute email_addresses
|
|
20
|
+
# Email addresses for this sub-entity.
|
|
21
|
+
# [Required] for every Accounts API v2.0 variant and the US ISV Seller variants; [Optional] for the
|
|
22
|
+
# other v3.0 variants.
|
|
8
23
|
# @return [EntityEmailAddresses]
|
|
9
24
|
# @!attribute invitee
|
|
25
|
+
# The details of the user responsible for onboarding the sub-entity.
|
|
26
|
+
# [Required] in the hosted onboarding invite request; [Optional] in the Full and Lite onboarding
|
|
27
|
+
# variants; not part of the US ISV Seller variants.
|
|
10
28
|
# @return [Invitee]
|
|
11
29
|
class ContactDetails
|
|
12
30
|
attr_accessor :phone,
|
|
@@ -2,11 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# The date of birth of the person according to the Gregorian calendar.
|
|
5
6
|
# @!attribute day
|
|
7
|
+
# The calendar day of the month they were born.
|
|
8
|
+
# [Required]
|
|
9
|
+
# min 1, max 31
|
|
6
10
|
# @return [Integer]
|
|
7
11
|
# @!attribute month
|
|
12
|
+
# The month of the year they were born.
|
|
13
|
+
# [Required]
|
|
14
|
+
# min 1, max 12
|
|
8
15
|
# @return [Integer]
|
|
9
16
|
# @!attribute year
|
|
17
|
+
# The year they were born.
|
|
18
|
+
# [Required]
|
|
19
|
+
# min 1900, max 2999
|
|
10
20
|
# @return [Integer]
|
|
11
21
|
class DateOfBirth
|
|
12
22
|
attr_accessor :day,
|
|
@@ -2,11 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# The date the company was incorporated, or the date the sole trader started trading.
|
|
5
6
|
# @!attribute day
|
|
7
|
+
# The day of the month the company was incorporated.
|
|
8
|
+
# [Optional]
|
|
9
|
+
# min 1, max 31
|
|
6
10
|
# @return [Integer]
|
|
7
11
|
# @!attribute month
|
|
12
|
+
# The month the company was incorporated.
|
|
13
|
+
# [Required]
|
|
14
|
+
# min 1, max 12
|
|
8
15
|
# @return [Integer]
|
|
9
16
|
# @!attribute year
|
|
17
|
+
# The year the company was incorporated.
|
|
18
|
+
# [Required]
|
|
19
|
+
# min 1500, max 2999
|
|
10
20
|
# @return [Integer]
|
|
11
21
|
class DateOfIncorporation
|
|
12
22
|
attr_accessor :day,
|
|
@@ -2,11 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# The document to use to confirm an individual's identity (identity_verification): on a representative
|
|
6
|
+
# ({RepresentativeDocuments}), or at the top level of the v2.0 sole trader variants.
|
|
5
7
|
# @!attribute type
|
|
8
|
+
# The type of document used for identity verification.
|
|
9
|
+
# [Required]
|
|
6
10
|
# @return [String] {DocumentType}
|
|
7
11
|
# @!attribute front
|
|
12
|
+
# The ID of the front side of the document as represented within Checkout.com systems.
|
|
13
|
+
# [Required]
|
|
14
|
+
# ^file_[a-z2-7]{26}$
|
|
15
|
+
# 31 characters
|
|
8
16
|
# @return [String]
|
|
9
17
|
# @!attribute back
|
|
18
|
+
# The ID of the back side of the document as represented within Checkout.com systems.
|
|
19
|
+
# [Optional]
|
|
20
|
+
# ^file_[a-z2-7]{26}$
|
|
21
|
+
# 31 characters
|
|
10
22
|
# @return [String]
|
|
11
23
|
class Document
|
|
12
24
|
attr_accessor :type,
|
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Not defined by any Accounts API onboarding schema. Referenced only by the deprecated {Company#document}
|
|
6
|
+
# and {EntityFinancialDocuments}.
|
|
7
|
+
# @deprecated Not part of any Accounts API onboarding schema.
|
|
5
8
|
# @!attribute type
|
|
9
|
+
# @deprecated Not defined by any Accounts API onboarding schema.
|
|
6
10
|
# @return [String]
|
|
7
11
|
# @!attribute file_id
|
|
12
|
+
# @deprecated Not defined by any Accounts API onboarding schema.
|
|
8
13
|
# @return [String]
|
|
9
14
|
class EntityDocument
|
|
10
15
|
attr_accessor :type,
|
|
@@ -2,10 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Email addresses for this sub-entity.
|
|
5
6
|
# @!attribute primary
|
|
7
|
+
# The main email address for this sub-entity.
|
|
8
|
+
# [Required]
|
|
9
|
+
# Format: email
|
|
10
|
+
# @return [String]
|
|
11
|
+
# @!attribute pci_compliance_contact
|
|
12
|
+
# The email address of the person responsible for PCI compliance at this sub-entity.
|
|
13
|
+
# [Required] for the US ISV Seller variants (3.0), together with primary; not part of the other
|
|
14
|
+
# variants.
|
|
15
|
+
# Format: email
|
|
6
16
|
# @return [String]
|
|
7
17
|
class EntityEmailAddresses
|
|
8
|
-
attr_accessor :primary
|
|
18
|
+
attr_accessor :primary,
|
|
19
|
+
:pci_compliance_contact
|
|
9
20
|
end
|
|
10
21
|
end
|
|
11
22
|
end
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
-
# Request
|
|
6
|
-
#
|
|
5
|
+
# Request for POST /entities/{entityId}/files.
|
|
7
6
|
# @!attribute purpose
|
|
8
|
-
#
|
|
7
|
+
# The purpose of the file upload: the onboarding document the file is for.
|
|
8
|
+
# [Required]
|
|
9
|
+
# @return [String] {FilePurpose}
|
|
9
10
|
class EntityFilesRequest
|
|
10
11
|
attr_accessor :purpose
|
|
11
12
|
end
|
|
@@ -2,15 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Seller financial questions (financial_details): on the company of EEA and US Company Full and Lite
|
|
6
|
+
# (2.0), and on the individual of US Sole Trader Full and Lite (2.0).
|
|
5
7
|
# @!attribute annual_processing_volume
|
|
8
|
+
# The estimated annual processing volume. In minor units without decimals.
|
|
9
|
+
# [Required] on the Full (2.0) variants; [Optional] on the Lite (2.0) variants.
|
|
10
|
+
# min 0
|
|
6
11
|
# @return [Integer]
|
|
7
12
|
# @!attribute average_transaction_value
|
|
13
|
+
# The expected average transaction value. In minor units without decimals.
|
|
14
|
+
# [Required] on the Full (2.0) variants; [Optional] on the Lite (2.0) variants.
|
|
15
|
+
# min 0
|
|
8
16
|
# @return [Integer]
|
|
9
17
|
# @!attribute highest_transaction_value
|
|
18
|
+
# The expected highest transaction value. In minor units without decimals.
|
|
19
|
+
# [Required] on the Full (2.0) variants; [Optional] on the Lite (2.0) variants.
|
|
20
|
+
# min 0
|
|
10
21
|
# @return [Integer]
|
|
11
22
|
# @!attribute documents
|
|
23
|
+
# @deprecated Not defined by any Accounts API schema; the API does not read it. Supporting documents go on
|
|
24
|
+
# {OnboardSubEntityDocuments} instead.
|
|
12
25
|
# @return [EntityFinancialDocuments]
|
|
13
26
|
# @!attribute currency
|
|
27
|
+
# The currency used for the financial details provided.
|
|
28
|
+
# [Required] on US Company Full and US Sole Trader Full (2.0); [Optional] on the other variants.
|
|
14
29
|
# @return [String] {CheckoutSdk::Common::Currency}
|
|
15
30
|
class EntityFinancialDetails
|
|
16
31
|
attr_accessor :annual_processing_volume,
|
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Not defined by any Accounts API schema: financial_details carries the three amounts and the currency
|
|
6
|
+
# only.
|
|
7
|
+
# @deprecated Not part of any Accounts API schema; the API does not read it.
|
|
5
8
|
# @!attribute bank_statement
|
|
9
|
+
# @deprecated Not defined by any Accounts API schema.
|
|
6
10
|
# @return [EntityDocument]
|
|
7
11
|
# @!attribute financial_statement
|
|
12
|
+
# @deprecated Not defined by any Accounts API schema.
|
|
8
13
|
# @return [EntityDocument]
|
|
9
14
|
class EntityFinancialDocuments
|
|
10
15
|
attr_accessor :bank_statement,
|