citypay_api_client 1.0.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 +7 -0
- data/Gemfile +9 -0
- data/README.md +176 -0
- data/Rakefile +10 -0
- data/citypay_api_client.gemspec +39 -0
- data/docs/AccountCreate.md +19 -0
- data/docs/AccountStatus.md +17 -0
- data/docs/Acknowledgement.md +23 -0
- data/docs/AirlineAdvice.md +47 -0
- data/docs/AirlineSegment.md +31 -0
- data/docs/AuthReference.md +43 -0
- data/docs/AuthReferences.md +17 -0
- data/docs/AuthRequest.md +59 -0
- data/docs/AuthResponse.md +69 -0
- data/docs/AuthenRequired.md +21 -0
- data/docs/CResAuthRequest.md +17 -0
- data/docs/CaptureRequest.md +27 -0
- data/docs/Card.md +51 -0
- data/docs/CardHolderAccount.md +31 -0
- data/docs/CardHolderAccountApi.md +515 -0
- data/docs/CardStatus.md +19 -0
- data/docs/ChargeRequest.md +41 -0
- data/docs/ContactDetails.md +41 -0
- data/docs/Decision.md +21 -0
- data/docs/Error.md +23 -0
- data/docs/ExternalMPI.md +25 -0
- data/docs/ListMerchantsResponse.md +21 -0
- data/docs/MCC6012.md +23 -0
- data/docs/Merchant.md +25 -0
- data/docs/OperationalApi.md +118 -0
- data/docs/PaResAuthRequest.md +19 -0
- data/docs/PaymentProcessingApi.md +338 -0
- data/docs/Ping.md +17 -0
- data/docs/RegisterCard.md +23 -0
- data/docs/RequestChallenged.md +25 -0
- data/docs/RetrieveRequest.md +21 -0
- data/docs/ThreeDSecure.md +25 -0
- data/docs/VoidRequest.md +23 -0
- data/git_push.sh +58 -0
- data/lib/citypay_api_client.rb +72 -0
- data/lib/citypay_api_client/api/card_holder_account_api.rb +628 -0
- data/lib/citypay_api_client/api/operational_api.rb +148 -0
- data/lib/citypay_api_client/api/payment_processing_api.rb +406 -0
- data/lib/citypay_api_client/api_client.rb +388 -0
- data/lib/citypay_api_client/api_error.rb +57 -0
- data/lib/citypay_api_client/configuration.rb +252 -0
- data/lib/citypay_api_client/models/account_create.rb +249 -0
- data/lib/citypay_api_client/models/account_status.rb +207 -0
- data/lib/citypay_api_client/models/acknowledgement.rb +285 -0
- data/lib/citypay_api_client/models/airline_advice.rb +551 -0
- data/lib/citypay_api_client/models/airline_segment.rb +408 -0
- data/lib/citypay_api_client/models/api_key.rb +53 -0
- data/lib/citypay_api_client/models/auth_reference.rb +400 -0
- data/lib/citypay_api_client/models/auth_references.rb +208 -0
- data/lib/citypay_api_client/models/auth_request.rb +631 -0
- data/lib/citypay_api_client/models/auth_response.rb +563 -0
- data/lib/citypay_api_client/models/authen_required.rb +227 -0
- data/lib/citypay_api_client/models/c_res_auth_request.rb +207 -0
- data/lib/citypay_api_client/models/capture_request.rb +285 -0
- data/lib/citypay_api_client/models/card.rb +425 -0
- data/lib/citypay_api_client/models/card_holder_account.rb +315 -0
- data/lib/citypay_api_client/models/card_status.rb +217 -0
- data/lib/citypay_api_client/models/charge_request.rb +453 -0
- data/lib/citypay_api_client/models/contact_details.rb +456 -0
- data/lib/citypay_api_client/models/decision.rb +224 -0
- data/lib/citypay_api_client/models/error.rb +285 -0
- data/lib/citypay_api_client/models/external_mpi.rb +307 -0
- data/lib/citypay_api_client/models/list_merchants_response.rb +252 -0
- data/lib/citypay_api_client/models/mcc6012.rb +237 -0
- data/lib/citypay_api_client/models/merchant.rb +247 -0
- data/lib/citypay_api_client/models/pa_res_auth_request.rb +227 -0
- data/lib/citypay_api_client/models/ping.rb +231 -0
- data/lib/citypay_api_client/models/register_card.rb +336 -0
- data/lib/citypay_api_client/models/request_challenged.rb +247 -0
- data/lib/citypay_api_client/models/retrieve_request.rb +256 -0
- data/lib/citypay_api_client/models/three_d_secure.rb +247 -0
- data/lib/citypay_api_client/models/void_request.rb +266 -0
- data/lib/citypay_api_client/version.rb +15 -0
- data/spec/api/card_holder_account_api_spec.rb +149 -0
- data/spec/api/operational_api_spec.rb +59 -0
- data/spec/api/payment_processing_api_spec.rb +107 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_create_spec.rb +47 -0
- data/spec/models/account_status_spec.rb +41 -0
- data/spec/models/acknowledgement_spec.rb +59 -0
- data/spec/models/airline_advice_spec.rb +131 -0
- data/spec/models/airline_segment_spec.rb +83 -0
- data/spec/models/auth_reference_spec.rb +119 -0
- data/spec/models/auth_references_spec.rb +41 -0
- data/spec/models/auth_request_spec.rb +167 -0
- data/spec/models/auth_response_spec.rb +197 -0
- data/spec/models/authen_required_spec.rb +53 -0
- data/spec/models/c_res_auth_request_spec.rb +41 -0
- data/spec/models/capture_request_spec.rb +71 -0
- data/spec/models/card_holder_account_spec.rb +83 -0
- data/spec/models/card_spec.rb +143 -0
- data/spec/models/card_status_spec.rb +47 -0
- data/spec/models/charge_request_spec.rb +113 -0
- data/spec/models/contact_details_spec.rb +113 -0
- data/spec/models/decision_spec.rb +53 -0
- data/spec/models/error_spec.rb +59 -0
- data/spec/models/external_mpi_spec.rb +65 -0
- data/spec/models/list_merchants_response_spec.rb +53 -0
- data/spec/models/mcc6012_spec.rb +59 -0
- data/spec/models/merchant_spec.rb +65 -0
- data/spec/models/pa_res_auth_request_spec.rb +47 -0
- data/spec/models/ping_spec.rb +41 -0
- data/spec/models/register_card_spec.rb +59 -0
- data/spec/models/request_challenged_spec.rb +65 -0
- data/spec/models/retrieve_request_spec.rb +53 -0
- data/spec/models/three_d_secure_spec.rb +65 -0
- data/spec/models/void_request_spec.rb +59 -0
- data/spec/spec_helper.rb +111 -0
- metadata +252 -0
data/docs/AuthRequest.md
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# CityPayApiClient::AuthRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**airline_data** | [**AirlineAdvice**](AirlineAdvice.md) | | [optional]
|
8
|
+
**amount** | **Integer** | The amount to authorise in the lowest unit of currency with a variable length to a maximum of 12 digits. No decimal points are to be included and no divisional characters such as 1,024. The amount should be the total amount required for the transaction. For example with GBP £1,021.95 the amount value is 102195. |
|
9
|
+
**avs_postcode_policy** | **String** | A policy value which determines whether an AVS postcode policy is enforced or bypassed. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the AVS postcode numeric value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the postcode did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send postcode details for authorisation. | [optional]
|
10
|
+
**bill_to** | [**ContactDetails**](ContactDetails.md) | | [optional]
|
11
|
+
**card_holder_name** | **String** | The card holder name as appears on the card such as MR N E BODY. Required for some acquirers. | [optional]
|
12
|
+
**cardnumber** | **String** | The card number (PAN) with a variable length to a maximum of 21 digits in numerical form. Any non numeric characters will be stripped out of the card number, this includes whitespace or separators internal of the provided value. The card number must be treated as sensitive data. We only provide an obfuscated value in logging and reporting. The plaintext value is encrypted in our database using AES 256 GMC bit encryption for settlement or refund purposes. When providing the card number to our gateway through the authorisation API you will be handling the card data on your application. This will require further PCI controls to be in place and this value must never be stored. |
|
13
|
+
**csc** | **String** | The Card Security Code (CSC) (also known as CV2/CVV2) is normally found on the back of the card (American Express has it on the front). The value helps to identify posession of the card as it is not available within the chip or magnetic swipe. When forwarding the CSC, please ensure the value is a string as some values start with 0 and this will be stripped out by any integer parsing. The CSC number aids fraud prevention in Mail Order and Internet payments. Business rules are available on your account to identify whether to accept or decline transactions based on mismatched results of the CSC. The Payment Card Industry (PCI) requires that at no stage of a transaction should the CSC be stored. This applies to all entities handling card data. It should also not be used in any hashing process. CityPay do not store the value and have no method of retrieving the value once the transaction has been processed. For this reason, duplicate checking is unable to determine the CSC in its duplication check algorithm. | [optional]
|
14
|
+
**csc_policy** | **String** | A policy value which determines whether a CSC policy is enforced or bypassed. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the CSC value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the CSC did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send the CSC details for authorisation. | [optional]
|
15
|
+
**currency** | **String** | The processing currency for the transaction. Will default to the merchant account currency. | [optional]
|
16
|
+
**duplicate_policy** | **String** | A policy value which determines whether a duplication policy is enforced or bypassed. A duplication check has a window of time set against your account within which it can action. If a previous transaction with matching values occurred within the window, any subsequent transaction will result in a T001 result. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be checked for duplication within the duplication window. `2` to bypass. Transactions that are bypassed will not be checked for duplication within the duplication window. `3` to ignore. Transactions that are ignored will have the same affect as bypass. | [optional]
|
17
|
+
**expmonth** | **Integer** | The month of expiry of the card. The month value should be a numerical value between 1 and 12. |
|
18
|
+
**expyear** | **Integer** | The year of expiry of the card. |
|
19
|
+
**external_mpi** | [**ExternalMPI**](ExternalMPI.md) | | [optional]
|
20
|
+
**identifier** | **String** | The identifier of the transaction to process. The value should be a valid reference and may be used to perform post processing actions and to aid in reconciliation of transactions. The value should be a valid printable string with ASCII character ranges from 32 to 127. The identifier is recommended to be distinct for each transaction such as a [random unique identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier) this will aid in ensuring each transaction is identifiable. When transactions are processed they are also checked for duplicate requests. Changing the identifier on a subsequent request will ensure that a transaction is considered as different. |
|
21
|
+
**match_avsa** | **String** | A policy value which determines whether an AVS address policy is enforced, bypassed or ignored. Values are `0` for the default policy (default value if not supplied). Your default values are determined by your account manager on setup of the account. `1` for an enforced policy. Transactions that are enforced will be rejected if the AVS address numeric value does not match. `2` to bypass. Transactions that are bypassed will be allowed through even if the address did not match. `3` to ignore. Transactions that are ignored will bypass the result and not send address numeric details for authorisation. | [optional]
|
22
|
+
**mcc6012** | [**MCC6012**](MCC6012.md) | | [optional]
|
23
|
+
**merchantid** | **Integer** | Identifies the merchant account to perform processing for. |
|
24
|
+
**sdk** | **String** | An optional reference value for the calling client such as a version number i.e. | [optional]
|
25
|
+
**ship_to** | [**ContactDetails**](ContactDetails.md) | | [optional]
|
26
|
+
**threedsecure** | [**ThreeDSecure**](ThreeDSecure.md) | | [optional]
|
27
|
+
**trans_info** | **String** | Further information that can be added to the transaction will display in reporting. Can be used for flexible values such as operator id. | [optional]
|
28
|
+
**trans_type** | **String** | The type of transaction being submitted. Normally this value is not required and your account manager may request that you set this field. | [optional]
|
29
|
+
|
30
|
+
## Code Sample
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
require 'CityPayApiClient'
|
34
|
+
|
35
|
+
instance = CityPayApiClient::AuthRequest.new(airline_data: null,
|
36
|
+
amount: 3600,
|
37
|
+
avs_postcode_policy: null,
|
38
|
+
bill_to: null,
|
39
|
+
card_holder_name: null,
|
40
|
+
cardnumber: 4000 0000 0000 0002,
|
41
|
+
csc: 12,
|
42
|
+
csc_policy: null,
|
43
|
+
currency: GBP,
|
44
|
+
duplicate_policy: null,
|
45
|
+
expmonth: 9,
|
46
|
+
expyear: 2023,
|
47
|
+
external_mpi: null,
|
48
|
+
identifier: 95b857a1-5955-4b86-963c-5a6dbfc4fb95,
|
49
|
+
match_avsa: null,
|
50
|
+
mcc6012: null,
|
51
|
+
merchantid: 11223344,
|
52
|
+
sdk: MyClient 1.3.0,
|
53
|
+
ship_to: null,
|
54
|
+
threedsecure: null,
|
55
|
+
trans_info: null,
|
56
|
+
trans_type: null)
|
57
|
+
```
|
58
|
+
|
59
|
+
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# CityPayApiClient::AuthResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**amount** | **Integer** | The amount of the transaction processed. | [optional]
|
8
|
+
**atrn** | **String** | A reference number provided by the acquirer for a transaction it can be used to cross reference transactions with an Acquirers reporting panel. | [optional]
|
9
|
+
**atsd** | **String** | Additional Transaction Security Data used for ecommerce transactions to decipher security capabilities and attempts against a transaction. | [optional]
|
10
|
+
**authcode** | **String** | The authorisation code as returned by the card issuer or acquiring bank when a transaction has successfully been authorised. Authorisation codes contain alphanumeric values. Whilst the code confirms authorisation it should not be used to determine whether a transaction was successfully processed. For instance an auth code may be returned when a transaction has been subsequently declined due to a CSC mismatch. | [optional]
|
11
|
+
**authen_result** | **String** | The result of any authentication using 3d_secure authorisation against ecommerce transactions. Values are | Value | Description | |-------|-------------| | Y | Authentication Successful. The Cardholder's password was successfully validated. | | N | Authentication Failed. Customer failed or cancelled authentication, transaction denied. | | A | Attempts Processing Performed Authentication could not be completed but a proof of authentication attempt (CAVV) was generated | | U | Authentication Could Not Be Performed Authentication could not be completed, due to technical or other problem | | [optional]
|
12
|
+
**authorised** | **Boolean** | A boolean definition that indicates that the transaction was authorised. It will return false if the transaction was declined, rejected or cancelled due to CSC matching failures. Attention should be referenced to the AuthResult and Response code for accurate determination of the result. | [optional]
|
13
|
+
**avs_result** | **String** | The AVS result codes determine the result of checking the AVS values within the Address Verification fraud system. If a transaction is declined due to the AVS code not matching, this value can help determine the reason for the decline. | Code | Description | |------|------------| | Y | Address and 5 digit post code match | | M | Street address and Postal codes match for international transaction | | U | No AVS data available from issuer auth system | | A | Addres matches, post code does not | | I | Address information verified for international transaction | | Z | 5 digit post code matches, Address does not | | W | 9 digit post code matches, Address does not | | X | Postcode and address match | | B | Postal code not verified due to incompatible formats | | P | Postal codes match. Street address not verified due to to incompatible formats | | E | AVS Error | | C | Street address and Postal code not verified due to incompatible formats | | D | Street address and postal codes match | | | No information | | N | Neither postcode nor address match | | R | Retry, System unavailble or Timed Out | | S | AVS Service not supported by issuer or processor | | G | Issuer does not participate in AVS | | [optional]
|
14
|
+
**bin_commercial** | **Boolean** | Determines whether the bin range was found to be a commercial or business card. | [optional]
|
15
|
+
**bin_debit** | **Boolean** | Determines whether the bin range was found to be a debit card. If false the card was considered as a credit card. | [optional]
|
16
|
+
**bin_description** | **String** | A description of the bin range found for the card. | [optional]
|
17
|
+
**cavv** | **String** | The cardholder authentication verification value which can be returned for verification purposes of the authenticated transaction for dispute realisation. | [optional]
|
18
|
+
**context** | **String** | The context which processed the transaction, can be used for support purposes to trace transactions. | [optional]
|
19
|
+
**csc_result** | **String** | The CSC rseult codes determine the result of checking the provided CSC value within the Card Security Code fraud system. If a transaction is declined due to the CSC code not matching, this value can help determine the reason for the decline. | Code | Description | |------|------------| | | No information | | M | Card verification data matches | | N | Card verification data was checked but did not match | | P | Card verification was not processed | | S | The card verification data should be on the card but the merchant indicates that it is not | | U | The card issuer is not certified | | [optional]
|
20
|
+
**currency** | **String** | The currency the transaction was processed in. This is an `ISO4217` alpha currency value. | [optional]
|
21
|
+
**datetime** | **DateTime** | The UTC date time of the transaction in ISO data time format. | [optional]
|
22
|
+
**eci** | **String** | An Electronic Commerce Indicator (ECI) used to identify the result of authentication using 3DSecure. | [optional]
|
23
|
+
**identifier** | **String** | The identifier provided within the request. | [optional]
|
24
|
+
**live** | **Boolean** | Used to identify that a tranasction was processed on a live authorisation platform. | [optional]
|
25
|
+
**maskedpan** | **String** | A masked value of the card number used for processing displaying limited values that can be used on a receipt. | [optional]
|
26
|
+
**merchantid** | **Integer** | The merchant id that processed this transaction. | [optional]
|
27
|
+
**result** | **Integer** | An integer result that indicates the outcome of the transaction. The Code value below maps to the result value | Code | Abbrev | Description | |------|-------|-------------| | 0 | Declined | Declined | | 1 | Accepted | Accepted | | 2 | Rejected | Rejected | | 3 | Not Attempted | Not Attempted | | 4 | Referred | Referred | | 5 | PinRetry | Perform PIN Retry | | 6 | ForSigVer | Force Signature Verification | | 7 | Hold | Hold | | 8 | SecErr | Security Error | | 9 | CallAcq | Call Acquirer | | 10 | DNH | Do Not Honour | | 11 | RtnCrd | Retain Card | | 12 | ExprdCrd | Expired Card | | 13 | InvldCrd | Invalid Card No | | 14 | PinExcd | Pin Tries Exceeded | | 15 | PinInvld | Pin Invalid | | 16 | AuthReq | Authentication Required | | 17 | AuthenFail | Authentication Failed | | 18 | Verified | Card Verified | | 19 | Cancelled | Cancelled | | 20 | Un | Unknown | | [optional]
|
28
|
+
**result_code** | **String** | The result code as defined in the Response Codes Reference for example 000 is an accepted live transaction whilst 001 is an accepted test transaction. Result codes identify the source of success and failure. Codes may start with an alpha character i.e. C001 indicating a type of error such as a card validation error. | [optional]
|
29
|
+
**result_message** | **String** | The message regarding the result which provides further narrative to the result code. | [optional]
|
30
|
+
**scheme** | **String** | A name of the card scheme of the transaction that processed the transaction such as Visa or MasterCard. | [optional]
|
31
|
+
**sha256** | **String** | A SHA256 digest value of the transaction used to validate the response data The digest is calculated by concatenating * authcode * amount * response_code * merchant_id * trans_no * identifier * licence_key - which is not provided in the response. | [optional]
|
32
|
+
**trans_status** | **String** | Used to identify the status of a transaction. The status is used to track a transaction through its life cycle. | Id | Description | |----|-------------| | O | Transaction is open for settlement | | A | Transaction is assigned for settlement and can no longer be voided | | S | Transaction has been settled | | D | Transaction has been declined | | R | Transaction has been rejected | | P | Transaction has been authorised only and awaiting a capture. Used in pre-auth situations | | C | Transaction has been cancelled | | E | Transaction has expired | | I | Transaction has been initialised but no action was able to be carried out | | H | Transaction is awaiting authorisation | | . | Transaction is on hold | | V | Transaction has been verified | | [optional]
|
33
|
+
**transno** | **Integer** | The resulting transaction number, ordered incrementally from 1 for every merchant_id. The value will default to less than 1 for transactions that do not have a transaction number issued. | [optional]
|
34
|
+
|
35
|
+
## Code Sample
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
require 'CityPayApiClient'
|
39
|
+
|
40
|
+
instance = CityPayApiClient::AuthResponse.new(amount: 3600,
|
41
|
+
atrn: null,
|
42
|
+
atsd: null,
|
43
|
+
authcode: 001245A,
|
44
|
+
authen_result: null,
|
45
|
+
authorised: true,
|
46
|
+
avs_result: null,
|
47
|
+
bin_commercial: null,
|
48
|
+
bin_debit: null,
|
49
|
+
bin_description: null,
|
50
|
+
cavv: null,
|
51
|
+
context: aspiu352908ns47n343598bads,
|
52
|
+
csc_result: null,
|
53
|
+
currency: GBP,
|
54
|
+
datetime: 2020-01-02T18:32:28Z,
|
55
|
+
eci: null,
|
56
|
+
identifier: 95b857a1-5955-4b86-963c-5a6dbfc4fb95,
|
57
|
+
live: true,
|
58
|
+
maskedpan: 4***********0002,
|
59
|
+
merchantid: 11223344,
|
60
|
+
result: 1,
|
61
|
+
result_code: 0,
|
62
|
+
result_message: Accepted Transaction,
|
63
|
+
scheme: Visa,
|
64
|
+
sha256: null,
|
65
|
+
trans_status: null,
|
66
|
+
transno: 78416)
|
67
|
+
```
|
68
|
+
|
69
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# CityPayApiClient::AuthenRequired
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**acs_url** | **String** | The url of the Access Control Server (ACS) to forward the user to. | [optional]
|
8
|
+
**md** | **String** | Merchant Data (MD) which should be sent to the ACS to establish and reference the authentication session. | [optional]
|
9
|
+
**pareq** | **String** | The Payer Authentication Request packet which should be `POSTed` to the Url of the ACS to establish the authentication session. Data should be sent untouched. | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'CityPayApiClient'
|
15
|
+
|
16
|
+
instance = CityPayApiClient::AuthenRequired.new(acs_url: https://acs.cardissuer.com/3dsv1,
|
17
|
+
md: null,
|
18
|
+
pareq: eNrNWdnOo0qSfpXSmUuf0+w2tFy/lOyYxYDZ79h3sAEbm6cfbFfV+bu6pqe7R2qNJeQkiIwlMyK+...)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# CityPayApiClient::CResAuthRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**cres** | **String** | The challenge response data forwarded by the ACS in 3D-Secure V2 processing. Data should be forwarded to CityPay unchanged for subsequent authorisation and processing. | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'CityPayApiClient'
|
13
|
+
|
14
|
+
instance = CityPayApiClient::CResAuthRequest.new(cres: x90+vZ/7Ll05Vid/jPfQn8adw+4D/vRDUGT19kndW97Hfirbv66ycfSp8jNlvy7PkHbx44NEt3vo...)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# CityPayApiClient::CaptureRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**airline_data** | [**AirlineAdvice**](AirlineAdvice.md) | | [optional]
|
8
|
+
**amount** | **Integer** | The completion amount provided in the lowest unit of currency for the specific currency of the merchant, with a variable length to a maximum of 12 digits. No decimal points to be included. For example with GBP 75.45 use the value 7545. Please check that you do not supply divisional characters such as 1,024 in the request which may be caused by some number formatters. If no amount is supplied, the original processing amount is used. | [optional]
|
9
|
+
**identifier** | **String** | The identifier of the transaction to capture. If an empty value is supplied then a `trans_no` value must be supplied. | [optional]
|
10
|
+
**merchantid** | **Integer** | Identifies the merchant account to perform the capture for. |
|
11
|
+
**sdk** | **String** | An optional reference value for the calling client such as a version number i.e. | [optional]
|
12
|
+
**transno** | **Integer** | The transaction number of the transaction to look up and capture. If an empty value is supplied then an identifier value must be supplied. | [optional]
|
13
|
+
|
14
|
+
## Code Sample
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'CityPayApiClient'
|
18
|
+
|
19
|
+
instance = CityPayApiClient::CaptureRequest.new(airline_data: null,
|
20
|
+
amount: 3600,
|
21
|
+
identifier: 95b857a1-5955-4b86-963c-5a6dbfc4fb95,
|
22
|
+
merchantid: 11223344,
|
23
|
+
sdk: MyClient 1.3.0,
|
24
|
+
transno: 78416)
|
25
|
+
```
|
26
|
+
|
27
|
+
|
data/docs/Card.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# CityPayApiClient::Card
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**bin_commercial** | **Boolean** | Defines whether the card is a commercial card. | [optional]
|
8
|
+
**bin_corporate** | **Boolean** | Defines whether the card is a corporate business card. | [optional]
|
9
|
+
**bin_country_issued** | **String** | The determined country where the card was issued. | [optional]
|
10
|
+
**bin_credit** | **Boolean** | Defines whether the card is a credit card. | [optional]
|
11
|
+
**bin_currency** | **String** | The default currency determined for the card. | [optional]
|
12
|
+
**bin_debit** | **Boolean** | Defines whether the card is a debit card. | [optional]
|
13
|
+
**bin_description** | **String** | A description of the bin on the card to identify what type of product the card is. | [optional]
|
14
|
+
**bin_eu** | **Boolean** | Defines whether the card is regulated within the EU. | [optional]
|
15
|
+
**card_id** | **String** | The id of the card that is returned. Should be used for referencing the card when perform any changes. | [optional]
|
16
|
+
**card_status** | **String** | The status of the card such, valid values are - ACTIVE the card is active for processing - INACTIVE the card is not active for processing - EXPIRED for cards that have passed their expiry date. | [optional]
|
17
|
+
**default** | **Boolean** | Determines if the card is the default card for the account and should be regarded as the first option to be used for processing. | [optional]
|
18
|
+
**expmonth** | **Integer** | The expiry month of the card. | [optional]
|
19
|
+
**expyear** | **Integer** | The expiry year of the card. | [optional]
|
20
|
+
**label** | **String** | A label which identifies this card. | [optional]
|
21
|
+
**label2** | **String** | A label which also provides the expiry date of the card. | [optional]
|
22
|
+
**last4digits** | **String** | The last 4 digits of the card to aid in identification. | [optional]
|
23
|
+
**scheme** | **String** | The scheme that issued the card. | [optional]
|
24
|
+
**token** | **String** | A token that can be used to process against the card. | [optional]
|
25
|
+
|
26
|
+
## Code Sample
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'CityPayApiClient'
|
30
|
+
|
31
|
+
instance = CityPayApiClient::Card.new(bin_commercial: null,
|
32
|
+
bin_corporate: null,
|
33
|
+
bin_country_issued: null,
|
34
|
+
bin_credit: null,
|
35
|
+
bin_currency: null,
|
36
|
+
bin_debit: null,
|
37
|
+
bin_description: null,
|
38
|
+
bin_eu: null,
|
39
|
+
card_id: null,
|
40
|
+
card_status: null,
|
41
|
+
default: null,
|
42
|
+
expmonth: 9,
|
43
|
+
expyear: 2023,
|
44
|
+
label: Visa/0002,
|
45
|
+
label2: Visa/0002,Exp:2304,
|
46
|
+
last4digits: 2,
|
47
|
+
scheme: Visa,
|
48
|
+
token: ctPCAPyNyCkx3Ry8wGyv8khC3ch2hUSB3Db..Qzr)
|
49
|
+
```
|
50
|
+
|
51
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# CityPayApiClient::CardHolderAccount
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**account_id** | **String** | The account id of the card holder account provided by the merchant which uniquely identifies the account. |
|
8
|
+
**cards** | [**Array<Card>**](Card.md) | | [optional]
|
9
|
+
**contact** | [**ContactDetails**](ContactDetails.md) | |
|
10
|
+
**date_created** | **DateTime** | The date and time the account was created. | [optional]
|
11
|
+
**default_card_id** | **String** | The id of the default card. | [optional]
|
12
|
+
**default_card_index** | **String** | The index in the array of the default card. | [optional]
|
13
|
+
**status** | **String** | Defines the status of the account for processing valid values are - ACTIVE for active accounts that are able to process - DISABLED for accounts that are currently disabled for processing. | [optional]
|
14
|
+
**unique_id** | **String** | A unique id of the card holder account which uniquely identifies the stored account. This value is not searchable. | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'CityPayApiClient'
|
20
|
+
|
21
|
+
instance = CityPayApiClient::CardHolderAccount.new(account_id: aaabbb-cccddd-eee,
|
22
|
+
cards: null,
|
23
|
+
contact: null,
|
24
|
+
date_created: 2020-01-02T18:32:28Z,
|
25
|
+
default_card_id: null,
|
26
|
+
default_card_index: null,
|
27
|
+
status: null,
|
28
|
+
unique_id: null)
|
29
|
+
```
|
30
|
+
|
31
|
+
|
@@ -0,0 +1,515 @@
|
|
1
|
+
# CityPayApiClient::CardHolderAccountApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.citypay.com/v6*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**account_card_delete_request**](CardHolderAccountApi.md#account_card_delete_request) | **DELETE** /account/{accountid}/card/{cardId} | Card Deletion
|
8
|
+
[**account_card_register_request**](CardHolderAccountApi.md#account_card_register_request) | **POST** /account/{accountid}/register | Card Registration
|
9
|
+
[**account_card_status_request**](CardHolderAccountApi.md#account_card_status_request) | **POST** /account/{accountid}/card/{cardId}/status | Card Status
|
10
|
+
[**account_change_contact_request**](CardHolderAccountApi.md#account_change_contact_request) | **POST** /account/{accountid}/contact | Contact Details Update
|
11
|
+
[**account_create**](CardHolderAccountApi.md#account_create) | **POST** /account/create | Account Create
|
12
|
+
[**account_delete_request**](CardHolderAccountApi.md#account_delete_request) | **DELETE** /account/{accountid} | Account Deletion
|
13
|
+
[**account_retrieve_request**](CardHolderAccountApi.md#account_retrieve_request) | **GET** /account/{accountid} | Account Retrieval
|
14
|
+
[**account_status_request**](CardHolderAccountApi.md#account_status_request) | **POST** /account/{accountid}/status | Account Status
|
15
|
+
[**charge_request**](CardHolderAccountApi.md#charge_request) | **POST** /charge | Charge
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
## account_card_delete_request
|
20
|
+
|
21
|
+
> Acknowledgement account_card_delete_request(accountid, card_id)
|
22
|
+
|
23
|
+
Card Deletion
|
24
|
+
|
25
|
+
Deletes a card from the account. The card will be marked for deletion before a subsequent purge will clear the card permanently.
|
26
|
+
|
27
|
+
### Example
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# load the gem
|
31
|
+
require 'citypay_api_client'
|
32
|
+
# setup authorization
|
33
|
+
CityPayApiClient.configure do |config|
|
34
|
+
# Configure API key authorization: cp-api-key
|
35
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
36
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
37
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
38
|
+
end
|
39
|
+
|
40
|
+
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
41
|
+
accountid = 'accountid_example' # String | The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
42
|
+
card_id = 'card_id_example' # String | The id of the card that is presented by a call to retrieve a card holder account.
|
43
|
+
|
44
|
+
begin
|
45
|
+
#Card Deletion
|
46
|
+
result = api_instance.account_card_delete_request(accountid, card_id)
|
47
|
+
p result
|
48
|
+
rescue CityPayApiClient::ApiError => e
|
49
|
+
puts "Exception when calling CardHolderAccountApi->account_card_delete_request: #{e}"
|
50
|
+
end
|
51
|
+
```
|
52
|
+
|
53
|
+
### Parameters
|
54
|
+
|
55
|
+
|
56
|
+
Name | Type | Description | Notes
|
57
|
+
------------- | ------------- | ------------- | -------------
|
58
|
+
**accountid** | **String**| The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. |
|
59
|
+
**card_id** | **String**| The id of the card that is presented by a call to retrieve a card holder account. |
|
60
|
+
|
61
|
+
### Return type
|
62
|
+
|
63
|
+
[**Acknowledgement**](Acknowledgement.md)
|
64
|
+
|
65
|
+
### Authorization
|
66
|
+
|
67
|
+
[cp-api-key](../README.md#cp-api-key)
|
68
|
+
|
69
|
+
### HTTP request headers
|
70
|
+
|
71
|
+
- **Content-Type**: Not defined
|
72
|
+
- **Accept**: application/json, text/xml
|
73
|
+
|
74
|
+
|
75
|
+
## account_card_register_request
|
76
|
+
|
77
|
+
> CardHolderAccount account_card_register_request(accountid, register_card)
|
78
|
+
|
79
|
+
Card Registration
|
80
|
+
|
81
|
+
Allows for a card to be registered for the account. The card will be added for future processing and will be available as a tokenised value for future processing. The card will be validated for 0. Being a valid card number (luhn check) 0. Having a valid expiry date 0. Being a valid bin value.
|
82
|
+
|
83
|
+
### Example
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
# load the gem
|
87
|
+
require 'citypay_api_client'
|
88
|
+
# setup authorization
|
89
|
+
CityPayApiClient.configure do |config|
|
90
|
+
# Configure API key authorization: cp-api-key
|
91
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
92
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
93
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
94
|
+
end
|
95
|
+
|
96
|
+
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
97
|
+
accountid = 'accountid_example' # String | The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
98
|
+
register_card = CityPayApiClient::RegisterCard.new # RegisterCard |
|
99
|
+
|
100
|
+
begin
|
101
|
+
#Card Registration
|
102
|
+
result = api_instance.account_card_register_request(accountid, register_card)
|
103
|
+
p result
|
104
|
+
rescue CityPayApiClient::ApiError => e
|
105
|
+
puts "Exception when calling CardHolderAccountApi->account_card_register_request: #{e}"
|
106
|
+
end
|
107
|
+
```
|
108
|
+
|
109
|
+
### Parameters
|
110
|
+
|
111
|
+
|
112
|
+
Name | Type | Description | Notes
|
113
|
+
------------- | ------------- | ------------- | -------------
|
114
|
+
**accountid** | **String**| The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. |
|
115
|
+
**register_card** | [**RegisterCard**](RegisterCard.md)| |
|
116
|
+
|
117
|
+
### Return type
|
118
|
+
|
119
|
+
[**CardHolderAccount**](CardHolderAccount.md)
|
120
|
+
|
121
|
+
### Authorization
|
122
|
+
|
123
|
+
[cp-api-key](../README.md#cp-api-key)
|
124
|
+
|
125
|
+
### HTTP request headers
|
126
|
+
|
127
|
+
- **Content-Type**: application/json, text/xml
|
128
|
+
- **Accept**: application/json, text/xml
|
129
|
+
|
130
|
+
|
131
|
+
## account_card_status_request
|
132
|
+
|
133
|
+
> Acknowledgement account_card_status_request(accountid, card_id, card_status)
|
134
|
+
|
135
|
+
Card Status
|
136
|
+
|
137
|
+
Updates the status of a card for processing. The following values are available | Status | Description | |--------|-------------| | Active | The card is active for processing and can be used for charging against with a valid token | | Inactive | The card is inactive for processing and cannot be used for processing, it will require reactivation before being used to charge | | Expired | The card has expired either due to the expiry date no longer being valid or due to a replacement card being issued |
|
138
|
+
|
139
|
+
### Example
|
140
|
+
|
141
|
+
```ruby
|
142
|
+
# load the gem
|
143
|
+
require 'citypay_api_client'
|
144
|
+
# setup authorization
|
145
|
+
CityPayApiClient.configure do |config|
|
146
|
+
# Configure API key authorization: cp-api-key
|
147
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
148
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
149
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
150
|
+
end
|
151
|
+
|
152
|
+
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
153
|
+
accountid = 'accountid_example' # String | The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
154
|
+
card_id = 'card_id_example' # String | The id of the card that is presented by a call to retrieve a card holder account.
|
155
|
+
card_status = CityPayApiClient::CardStatus.new # CardStatus |
|
156
|
+
|
157
|
+
begin
|
158
|
+
#Card Status
|
159
|
+
result = api_instance.account_card_status_request(accountid, card_id, card_status)
|
160
|
+
p result
|
161
|
+
rescue CityPayApiClient::ApiError => e
|
162
|
+
puts "Exception when calling CardHolderAccountApi->account_card_status_request: #{e}"
|
163
|
+
end
|
164
|
+
```
|
165
|
+
|
166
|
+
### Parameters
|
167
|
+
|
168
|
+
|
169
|
+
Name | Type | Description | Notes
|
170
|
+
------------- | ------------- | ------------- | -------------
|
171
|
+
**accountid** | **String**| The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. |
|
172
|
+
**card_id** | **String**| The id of the card that is presented by a call to retrieve a card holder account. |
|
173
|
+
**card_status** | [**CardStatus**](CardStatus.md)| |
|
174
|
+
|
175
|
+
### Return type
|
176
|
+
|
177
|
+
[**Acknowledgement**](Acknowledgement.md)
|
178
|
+
|
179
|
+
### Authorization
|
180
|
+
|
181
|
+
[cp-api-key](../README.md#cp-api-key)
|
182
|
+
|
183
|
+
### HTTP request headers
|
184
|
+
|
185
|
+
- **Content-Type**: application/json, text/xml
|
186
|
+
- **Accept**: application/json, text/xml
|
187
|
+
|
188
|
+
|
189
|
+
## account_change_contact_request
|
190
|
+
|
191
|
+
> CardHolderAccount account_change_contact_request(accountid, contact_details)
|
192
|
+
|
193
|
+
Contact Details Update
|
194
|
+
|
195
|
+
Allows for the ability to change the contact details for an account.
|
196
|
+
|
197
|
+
### Example
|
198
|
+
|
199
|
+
```ruby
|
200
|
+
# load the gem
|
201
|
+
require 'citypay_api_client'
|
202
|
+
# setup authorization
|
203
|
+
CityPayApiClient.configure do |config|
|
204
|
+
# Configure API key authorization: cp-api-key
|
205
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
206
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
207
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
208
|
+
end
|
209
|
+
|
210
|
+
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
211
|
+
accountid = 'accountid_example' # String | The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
212
|
+
contact_details = CityPayApiClient::ContactDetails.new # ContactDetails |
|
213
|
+
|
214
|
+
begin
|
215
|
+
#Contact Details Update
|
216
|
+
result = api_instance.account_change_contact_request(accountid, contact_details)
|
217
|
+
p result
|
218
|
+
rescue CityPayApiClient::ApiError => e
|
219
|
+
puts "Exception when calling CardHolderAccountApi->account_change_contact_request: #{e}"
|
220
|
+
end
|
221
|
+
```
|
222
|
+
|
223
|
+
### Parameters
|
224
|
+
|
225
|
+
|
226
|
+
Name | Type | Description | Notes
|
227
|
+
------------- | ------------- | ------------- | -------------
|
228
|
+
**accountid** | **String**| The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. |
|
229
|
+
**contact_details** | [**ContactDetails**](ContactDetails.md)| |
|
230
|
+
|
231
|
+
### Return type
|
232
|
+
|
233
|
+
[**CardHolderAccount**](CardHolderAccount.md)
|
234
|
+
|
235
|
+
### Authorization
|
236
|
+
|
237
|
+
[cp-api-key](../README.md#cp-api-key)
|
238
|
+
|
239
|
+
### HTTP request headers
|
240
|
+
|
241
|
+
- **Content-Type**: application/json, text/xml
|
242
|
+
- **Accept**: application/json, text/xml
|
243
|
+
|
244
|
+
|
245
|
+
## account_create
|
246
|
+
|
247
|
+
> CardHolderAccount account_create(account_create)
|
248
|
+
|
249
|
+
Account Create
|
250
|
+
|
251
|
+
Creates a new card holder account and initialises the account ready for adding cards.
|
252
|
+
|
253
|
+
### Example
|
254
|
+
|
255
|
+
```ruby
|
256
|
+
# load the gem
|
257
|
+
require 'citypay_api_client'
|
258
|
+
# setup authorization
|
259
|
+
CityPayApiClient.configure do |config|
|
260
|
+
# Configure API key authorization: cp-api-key
|
261
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
262
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
263
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
264
|
+
end
|
265
|
+
|
266
|
+
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
267
|
+
account_create = CityPayApiClient::AccountCreate.new # AccountCreate |
|
268
|
+
|
269
|
+
begin
|
270
|
+
#Account Create
|
271
|
+
result = api_instance.account_create(account_create)
|
272
|
+
p result
|
273
|
+
rescue CityPayApiClient::ApiError => e
|
274
|
+
puts "Exception when calling CardHolderAccountApi->account_create: #{e}"
|
275
|
+
end
|
276
|
+
```
|
277
|
+
|
278
|
+
### Parameters
|
279
|
+
|
280
|
+
|
281
|
+
Name | Type | Description | Notes
|
282
|
+
------------- | ------------- | ------------- | -------------
|
283
|
+
**account_create** | [**AccountCreate**](AccountCreate.md)| |
|
284
|
+
|
285
|
+
### Return type
|
286
|
+
|
287
|
+
[**CardHolderAccount**](CardHolderAccount.md)
|
288
|
+
|
289
|
+
### Authorization
|
290
|
+
|
291
|
+
[cp-api-key](../README.md#cp-api-key)
|
292
|
+
|
293
|
+
### HTTP request headers
|
294
|
+
|
295
|
+
- **Content-Type**: application/json, text/xml
|
296
|
+
- **Accept**: application/json, text/xml
|
297
|
+
|
298
|
+
|
299
|
+
## account_delete_request
|
300
|
+
|
301
|
+
> Acknowledgement account_delete_request(accountid)
|
302
|
+
|
303
|
+
Account Deletion
|
304
|
+
|
305
|
+
Allows for the deletion of an account. The account will marked for deletion and subsequent purging. No further transactions will be alowed to be processed or actioned against this account.
|
306
|
+
|
307
|
+
### Example
|
308
|
+
|
309
|
+
```ruby
|
310
|
+
# load the gem
|
311
|
+
require 'citypay_api_client'
|
312
|
+
# setup authorization
|
313
|
+
CityPayApiClient.configure do |config|
|
314
|
+
# Configure API key authorization: cp-api-key
|
315
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
316
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
317
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
318
|
+
end
|
319
|
+
|
320
|
+
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
321
|
+
accountid = 'accountid_example' # String | The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
322
|
+
|
323
|
+
begin
|
324
|
+
#Account Deletion
|
325
|
+
result = api_instance.account_delete_request(accountid)
|
326
|
+
p result
|
327
|
+
rescue CityPayApiClient::ApiError => e
|
328
|
+
puts "Exception when calling CardHolderAccountApi->account_delete_request: #{e}"
|
329
|
+
end
|
330
|
+
```
|
331
|
+
|
332
|
+
### Parameters
|
333
|
+
|
334
|
+
|
335
|
+
Name | Type | Description | Notes
|
336
|
+
------------- | ------------- | ------------- | -------------
|
337
|
+
**accountid** | **String**| The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. |
|
338
|
+
|
339
|
+
### Return type
|
340
|
+
|
341
|
+
[**Acknowledgement**](Acknowledgement.md)
|
342
|
+
|
343
|
+
### Authorization
|
344
|
+
|
345
|
+
[cp-api-key](../README.md#cp-api-key)
|
346
|
+
|
347
|
+
### HTTP request headers
|
348
|
+
|
349
|
+
- **Content-Type**: Not defined
|
350
|
+
- **Accept**: application/json, text/xml
|
351
|
+
|
352
|
+
|
353
|
+
## account_retrieve_request
|
354
|
+
|
355
|
+
> CardHolderAccount account_retrieve_request(accountid)
|
356
|
+
|
357
|
+
Account Retrieval
|
358
|
+
|
359
|
+
Allows for the retrieval of a card holder account for the given `id`. Should duplicate accounts exist for the same `id`, the first account created with that `id` will be returned. The account can be used for tokenisation processing by listing all cards assigned to the account. The returned cards will include all `active`, `inactive` and `expired` cards. This can be used to enable a card holder to view their wallet and make constructive choices on which card to use.
|
360
|
+
|
361
|
+
### Example
|
362
|
+
|
363
|
+
```ruby
|
364
|
+
# load the gem
|
365
|
+
require 'citypay_api_client'
|
366
|
+
# setup authorization
|
367
|
+
CityPayApiClient.configure do |config|
|
368
|
+
# Configure API key authorization: cp-api-key
|
369
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
370
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
371
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
372
|
+
end
|
373
|
+
|
374
|
+
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
375
|
+
accountid = 'accountid_example' # String | The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
376
|
+
|
377
|
+
begin
|
378
|
+
#Account Retrieval
|
379
|
+
result = api_instance.account_retrieve_request(accountid)
|
380
|
+
p result
|
381
|
+
rescue CityPayApiClient::ApiError => e
|
382
|
+
puts "Exception when calling CardHolderAccountApi->account_retrieve_request: #{e}"
|
383
|
+
end
|
384
|
+
```
|
385
|
+
|
386
|
+
### Parameters
|
387
|
+
|
388
|
+
|
389
|
+
Name | Type | Description | Notes
|
390
|
+
------------- | ------------- | ------------- | -------------
|
391
|
+
**accountid** | **String**| The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. |
|
392
|
+
|
393
|
+
### Return type
|
394
|
+
|
395
|
+
[**CardHolderAccount**](CardHolderAccount.md)
|
396
|
+
|
397
|
+
### Authorization
|
398
|
+
|
399
|
+
[cp-api-key](../README.md#cp-api-key)
|
400
|
+
|
401
|
+
### HTTP request headers
|
402
|
+
|
403
|
+
- **Content-Type**: Not defined
|
404
|
+
- **Accept**: application/json, text/xml
|
405
|
+
|
406
|
+
|
407
|
+
## account_status_request
|
408
|
+
|
409
|
+
> Acknowledgement account_status_request(accountid, account_status)
|
410
|
+
|
411
|
+
Account Status
|
412
|
+
|
413
|
+
Updates the status of an account. An account can have the following statuses applied | Status | Description | |--------|-------------| | Active | The account is active for processing | | Disabled | The account has been disabled and cannot be used for processing. The account will require reactivation to continue procesing |
|
414
|
+
|
415
|
+
### Example
|
416
|
+
|
417
|
+
```ruby
|
418
|
+
# load the gem
|
419
|
+
require 'citypay_api_client'
|
420
|
+
# setup authorization
|
421
|
+
CityPayApiClient.configure do |config|
|
422
|
+
# Configure API key authorization: cp-api-key
|
423
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
424
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
425
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
426
|
+
end
|
427
|
+
|
428
|
+
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
429
|
+
accountid = 'accountid_example' # String | The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account.
|
430
|
+
account_status = CityPayApiClient::AccountStatus.new # AccountStatus |
|
431
|
+
|
432
|
+
begin
|
433
|
+
#Account Status
|
434
|
+
result = api_instance.account_status_request(accountid, account_status)
|
435
|
+
p result
|
436
|
+
rescue CityPayApiClient::ApiError => e
|
437
|
+
puts "Exception when calling CardHolderAccountApi->account_status_request: #{e}"
|
438
|
+
end
|
439
|
+
```
|
440
|
+
|
441
|
+
### Parameters
|
442
|
+
|
443
|
+
|
444
|
+
Name | Type | Description | Notes
|
445
|
+
------------- | ------------- | ------------- | -------------
|
446
|
+
**accountid** | **String**| The account id that refers to the customer's account no. This value will have been provided when setting up the card holder account. |
|
447
|
+
**account_status** | [**AccountStatus**](AccountStatus.md)| |
|
448
|
+
|
449
|
+
### Return type
|
450
|
+
|
451
|
+
[**Acknowledgement**](Acknowledgement.md)
|
452
|
+
|
453
|
+
### Authorization
|
454
|
+
|
455
|
+
[cp-api-key](../README.md#cp-api-key)
|
456
|
+
|
457
|
+
### HTTP request headers
|
458
|
+
|
459
|
+
- **Content-Type**: application/json, text/xml
|
460
|
+
- **Accept**: application/json, text/xml
|
461
|
+
|
462
|
+
|
463
|
+
## charge_request
|
464
|
+
|
465
|
+
> Decision charge_request(charge_request)
|
466
|
+
|
467
|
+
Charge
|
468
|
+
|
469
|
+
A charge process obtains an authorisation using a tokenised value which represents a stored card on a card holder account. A card must previously be registered by calling `/account-register-card` with the card details or retrieved using `/account-retrieve` Tokens are generated whenever a previously registered list of cards are retrieved. Each token has, by design a relatively short time to live of 30 minutes. This is both to safe guard the merchant and card holder from replay attacks. Tokens are also restricted to your account, preventing malicious actors from stealing details for use elsewhere. If a token is reused after it has expired it will be rejected and a new token will be required. Tokenisation can be used for - repeat authorisations on a previously stored card - easy authorisations just requiring CSC values to be entered - can be used for credential on file style payments - can require full 3-D Secure authentication to retain the liability shift - wallet style usage.
|
470
|
+
|
471
|
+
### Example
|
472
|
+
|
473
|
+
```ruby
|
474
|
+
# load the gem
|
475
|
+
require 'citypay_api_client'
|
476
|
+
# setup authorization
|
477
|
+
CityPayApiClient.configure do |config|
|
478
|
+
# Configure API key authorization: cp-api-key
|
479
|
+
config.api_key['cp-api-key'] = 'YOUR API KEY'
|
480
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
481
|
+
#config.api_key_prefix['cp-api-key'] = 'Bearer'
|
482
|
+
end
|
483
|
+
|
484
|
+
api_instance = CityPayApiClient::CardHolderAccountApi.new
|
485
|
+
charge_request = CityPayApiClient::ChargeRequest.new # ChargeRequest |
|
486
|
+
|
487
|
+
begin
|
488
|
+
#Charge
|
489
|
+
result = api_instance.charge_request(charge_request)
|
490
|
+
p result
|
491
|
+
rescue CityPayApiClient::ApiError => e
|
492
|
+
puts "Exception when calling CardHolderAccountApi->charge_request: #{e}"
|
493
|
+
end
|
494
|
+
```
|
495
|
+
|
496
|
+
### Parameters
|
497
|
+
|
498
|
+
|
499
|
+
Name | Type | Description | Notes
|
500
|
+
------------- | ------------- | ------------- | -------------
|
501
|
+
**charge_request** | [**ChargeRequest**](ChargeRequest.md)| |
|
502
|
+
|
503
|
+
### Return type
|
504
|
+
|
505
|
+
[**Decision**](Decision.md)
|
506
|
+
|
507
|
+
### Authorization
|
508
|
+
|
509
|
+
[cp-api-key](../README.md#cp-api-key)
|
510
|
+
|
511
|
+
### HTTP request headers
|
512
|
+
|
513
|
+
- **Content-Type**: application/json, text/xml
|
514
|
+
- **Accept**: application/json, text/xml
|
515
|
+
|