citypay_api_client 1.0.1 → 1.0.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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +7 -11
  4. data/citypay_api_client.gemspec +0 -1
  5. data/docs/Decision.md +6 -6
  6. data/lib/citypay_api_client.rb +2 -3
  7. data/lib/citypay_api_client/api/card_holder_account_api.rb +0 -1
  8. data/lib/citypay_api_client/api/operational_api.rb +0 -1
  9. data/lib/citypay_api_client/api/payment_processing_api.rb +0 -1
  10. data/lib/citypay_api_client/api_client.rb +7 -3
  11. data/lib/citypay_api_client/api_error.rb +0 -1
  12. data/lib/citypay_api_client/configuration.rb +0 -1
  13. data/lib/citypay_api_client/models/account_create.rb +0 -1
  14. data/lib/citypay_api_client/models/account_status.rb +0 -1
  15. data/lib/citypay_api_client/models/acknowledgement.rb +0 -1
  16. data/lib/citypay_api_client/models/airline_advice.rb +0 -1
  17. data/lib/citypay_api_client/models/airline_segment.rb +0 -1
  18. data/lib/citypay_api_client/models/auth_reference.rb +0 -1
  19. data/lib/citypay_api_client/models/auth_references.rb +0 -1
  20. data/lib/citypay_api_client/models/auth_request.rb +0 -1
  21. data/lib/citypay_api_client/models/auth_response.rb +0 -1
  22. data/lib/citypay_api_client/models/authen_required.rb +0 -1
  23. data/lib/citypay_api_client/models/c_res_auth_request.rb +0 -1
  24. data/lib/citypay_api_client/models/capture_request.rb +0 -1
  25. data/lib/citypay_api_client/models/card.rb +0 -1
  26. data/lib/citypay_api_client/models/card_holder_account.rb +0 -1
  27. data/lib/citypay_api_client/models/card_status.rb +0 -1
  28. data/lib/citypay_api_client/models/charge_request.rb +0 -1
  29. data/lib/citypay_api_client/models/contact_details.rb +0 -1
  30. data/lib/citypay_api_client/models/decision.rb +19 -20
  31. data/lib/citypay_api_client/models/error.rb +0 -1
  32. data/lib/citypay_api_client/models/external_mpi.rb +0 -1
  33. data/lib/citypay_api_client/models/list_merchants_response.rb +0 -1
  34. data/lib/citypay_api_client/models/mcc6012.rb +0 -1
  35. data/lib/citypay_api_client/models/merchant.rb +0 -1
  36. data/lib/citypay_api_client/models/pa_res_auth_request.rb +0 -1
  37. data/lib/citypay_api_client/models/ping.rb +0 -1
  38. data/lib/citypay_api_client/models/register_card.rb +0 -1
  39. data/lib/citypay_api_client/models/request_challenged.rb +0 -1
  40. data/lib/citypay_api_client/models/retrieve_request.rb +0 -1
  41. data/lib/citypay_api_client/models/three_d_secure.rb +0 -1
  42. data/lib/citypay_api_client/models/void_request.rb +0 -1
  43. data/lib/citypay_api_client/test.rb +20 -0
  44. data/lib/citypay_api_client/version.rb +1 -2
  45. data/spec/api/card_holder_account_api_spec.rb +0 -1
  46. data/spec/api/operational_api_spec.rb +0 -1
  47. data/spec/api/payment_processing_api_spec.rb +0 -1
  48. data/spec/api_client_spec.rb +0 -1
  49. data/spec/configuration_spec.rb +0 -1
  50. data/spec/models/account_create_spec.rb +0 -1
  51. data/spec/models/account_status_spec.rb +0 -1
  52. data/spec/models/acknowledgement_spec.rb +16 -6
  53. data/spec/models/airline_advice_spec.rb +0 -1
  54. data/spec/models/airline_segment_spec.rb +0 -1
  55. data/spec/models/api_key_spec.rb +1 -1
  56. data/spec/models/auth_reference_spec.rb +0 -1
  57. data/spec/models/auth_references_spec.rb +42 -3
  58. data/spec/models/auth_request_spec.rb +0 -1
  59. data/spec/models/auth_response_spec.rb +62 -29
  60. data/spec/models/authen_required_spec.rb +0 -1
  61. data/spec/models/c_res_auth_request_spec.rb +0 -1
  62. data/spec/models/capture_request_spec.rb +0 -1
  63. data/spec/models/card_holder_account_spec.rb +84 -9
  64. data/spec/models/card_spec.rb +0 -1
  65. data/spec/models/card_status_spec.rb +0 -1
  66. data/spec/models/charge_request_spec.rb +0 -1
  67. data/spec/models/contact_details_spec.rb +0 -1
  68. data/spec/models/decision_spec.rb +94 -3
  69. data/spec/models/error_spec.rb +0 -1
  70. data/spec/models/external_mpi_spec.rb +0 -1
  71. data/spec/models/list_merchants_response_spec.rb +40 -5
  72. data/spec/models/mcc6012_spec.rb +0 -1
  73. data/spec/models/merchant_spec.rb +0 -1
  74. data/spec/models/pa_res_auth_request_spec.rb +0 -1
  75. data/spec/models/ping_spec.rb +0 -1
  76. data/spec/models/register_card_spec.rb +0 -1
  77. data/spec/models/request_challenged_spec.rb +0 -1
  78. data/spec/models/retrieve_request_spec.rb +0 -1
  79. data/spec/models/three_d_secure_spec.rb +0 -1
  80. data/spec/models/void_request_spec.rb +0 -1
  81. data/spec/spec_helper.rb +0 -1
  82. metadata +3 -3
  83. data/citypay_api-1.0.1.gem +0 -0
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -21,12 +20,59 @@ describe 'CardHolderAccount' do
21
20
  before do
22
21
  # run before each test
23
22
  @instance = CityPayApiClient::CardHolderAccount.new
23
+ json = '{"CardHolderAccount": {
24
+ "account_id": "abc123",
25
+ "cards": [{
26
+ "bin_commercial": false,
27
+ "bin_corporate": false,
28
+ "bin_country_issued": "GBR",
29
+ "bin_currency": "GBP",
30
+ "bin_description": "Visa Classic",
31
+ "bin_eu": false,
32
+ "card_id": "2U1XV3PJSeUXFNzXidACn2TyCzAK",
33
+ "card_status": "ACTIVE",
34
+ "default": true,
35
+ "expmonth": 7,
36
+ "expyear": 2022,
37
+ "label": "TestVisa/0002",
38
+ "label2": "TestVisa/0002,Exp:7/2022",
39
+ "scheme": "TestVisa",
40
+ "token": "ctPCzxq4WxEwWbkG7whRPLRCG27vYFNzsEDNihYmDwqsBc5QEXnFRvq2j5oRyb56ErRVEQaBN7PFMEDtjQQXDQpfxKkp3AxbyeGo61RhKBjFTFegaP4LBZUxFZimsXW8Deae9VyhWSgS2o8AXzTJU9UP3bo8kRcpataxuH3fJj3JHDnyeZt"
41
+ }],
42
+ "contact": {
43
+ "address1": "7 Esplanade",
44
+ "address2": "",
45
+ "address3": "",
46
+ "area": "St Helier",
47
+ "company": "CityPay Ltd",
48
+ "country": "JE",
49
+ "email": "support@citypay.com",
50
+ "firstname": "Joe",
51
+ "lastname": "Wicks",
52
+ "mobile_no": "077112123456",
53
+ "postcode": "JE2 3QA",
54
+ "telephone_no": "+4415341234567",
55
+ "title": "Mr"},
56
+ "date_created": "2020-08-01T09:15:24Z",
57
+ "default_card_id": "2U1XV3PJSeUXFNzXidACn2TyCzAK",
58
+ "default_card_index": 0,
59
+ "status": "ACTIVE",
60
+ "unique_id": "Ew3BKeWNdL3qKQU7XK7Sbt2eAL5WFW4AfoASDSA"
61
+ }}'
62
+ data = JSON.parse(json, :symbolize_names => true)
63
+ @account = CityPayApiClient::ApiClient.new.convert_to_type(data, "CardHolderAccount")
24
64
  end
25
65
 
26
66
  after do
27
67
  # run after each test
28
68
  end
29
69
 
70
+ describe 'JSON parser' do
71
+ it 'should parse an account' do
72
+ expect(@account).to be_instance_of(CityPayApiClient::CardHolderAccount)
73
+ end
74
+ end
75
+
30
76
  describe 'test an instance of CardHolderAccount' do
31
77
  it 'should create an instance of CardHolderAccount' do
32
78
  expect(@instance).to be_instance_of(CityPayApiClient::CardHolderAccount)
@@ -34,49 +80,78 @@ describe 'CardHolderAccount' do
34
80
  end
35
81
  describe 'test attribute "account_id"' do
36
82
  it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
83
+ expect(@account.account_id).to eq("abc123")
38
84
  end
39
85
  end
40
86
 
41
87
  describe 'test attribute "cards"' do
42
88
  it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
89
+ expect(@account.cards.length).to eq(1)
90
+ @c = @account.cards[0]
91
+ expect(@c.bin_commercial).to eq(false)
92
+ expect(@c.bin_corporate).to eq(false)
93
+ expect(@c.bin_country_issued).to eq("GBR")
94
+ expect(@c.bin_currency).to eq("GBP")
95
+ expect(@c.bin_description).to eq("Visa Classic")
96
+ expect(@c.bin_eu).to eq(false)
97
+ expect(@c.card_id).to eq("2U1XV3PJSeUXFNzXidACn2TyCzAK")
98
+ expect(@c.card_status).to eq("ACTIVE")
99
+ expect(@c.default).to eq(true)
100
+ expect(@c.expmonth).to eq(7)
101
+ expect(@c.expyear).to eq(2022)
102
+ expect(@c.label).to eq("TestVisa/0002")
103
+ expect(@c.label2).to eq("TestVisa/0002,Exp:7/2022")
104
+ expect(@c.scheme).to eq("TestVisa")
105
+ expect(@c.token).to eq("ctPCzxq4WxEwWbkG7whRPLRCG27vYFNzsEDNihYmDwqsBc5QEXnFRvq2j5oRyb56ErRVEQaBN7PFMEDtjQQXDQpfxKkp3AxbyeGo61RhKBjFTFegaP4LBZUxFZimsXW8Deae9VyhWSgS2o8AXzTJU9UP3bo8kRcpataxuH3fJj3JHDnyeZt")
44
106
  end
45
107
  end
46
108
 
47
109
  describe 'test attribute "contact"' do
48
110
  it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
111
+ @c = @account.contact
112
+ expect(@c.address1).to eq("7 Esplanade")
113
+ expect(@c.address2).to eq("")
114
+ expect(@c.address3).to eq("")
115
+ expect(@c.area).to eq("St Helier")
116
+ expect(@c.company).to eq("CityPay Ltd")
117
+ expect(@c.country).to eq("JE")
118
+ expect(@c.email).to eq("support@citypay.com")
119
+ expect(@c.firstname).to eq("Joe")
120
+ expect(@c.lastname).to eq("Wicks")
121
+ expect(@c.mobile_no).to eq("077112123456")
122
+ expect(@c.postcode).to eq("JE2 3QA")
123
+ expect(@c.telephone_no).to eq("+4415341234567")
124
+ expect(@c.title).to eq("Mr")
50
125
  end
51
126
  end
52
127
 
53
128
  describe 'test attribute "date_created"' do
54
129
  it 'should work' do
55
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
130
+ expect(@account.date_created).to eq(DateTime.parse("2020-08-01T09:15:24Z"))
56
131
  end
57
132
  end
58
133
 
59
134
  describe 'test attribute "default_card_id"' do
60
135
  it 'should work' do
61
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
136
+ expect(@account.default_card_id).to eq("2U1XV3PJSeUXFNzXidACn2TyCzAK")
62
137
  end
63
138
  end
64
139
 
65
140
  describe 'test attribute "default_card_index"' do
66
141
  it 'should work' do
67
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
142
+ expect(@account.default_card_index).to eq("0")
68
143
  end
69
144
  end
70
145
 
71
146
  describe 'test attribute "status"' do
72
147
  it 'should work' do
73
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
148
+ expect(@account.status).to eq("ACTIVE")
74
149
  end
75
150
  end
76
151
 
77
152
  describe 'test attribute "unique_id"' do
78
153
  it 'should work' do
79
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
154
+ expect(@account.unique_id).to eq("Ew3BKeWNdL3qKQU7XK7Sbt2eAL5WFW4AfoASDSA")
80
155
  end
81
156
  end
82
157
 
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -27,13 +26,39 @@ describe 'Decision' do
27
26
  # run after each test
28
27
  end
29
28
 
29
+ def convert_decision(json)
30
+ data = JSON.parse(json, :symbolize_names => true)
31
+ CityPayApiClient::ApiClient.new.convert_to_type(data, "Decision")
32
+
33
+ end
34
+
30
35
  describe 'test an instance of Decision' do
31
36
  it 'should create an instance of Decision' do
32
37
  expect(@instance).to be_instance_of(CityPayApiClient::Decision)
33
38
  end
34
39
  end
35
- describe 'test attribute "authentication"' do
40
+
41
+
42
+ describe 'test attribute "authen_required"' do
36
43
  it 'should work' do
44
+
45
+ decision = convert_decision '{
46
+ "AuthenRequired": {
47
+ "acs_url": "https://www.acs.com/tdsecure/opt_in_dispatcher.jsp?partner=debit&VAA=B",
48
+ "md": "0000000000000000000022",
49
+ "pareq": "eJxVUm1v2yAQ/itWv8dg/B5dmJyfw=="
50
+ }
51
+ }'
52
+
53
+ expect(decision.auth_response).to be_nil
54
+ expect(decision.request_challenged).to be_nil
55
+ expect(decision.authen_required).to be_truthy
56
+
57
+ expect(decision.authen_required.acs_url).to eq("https://www.acs.com/tdsecure/opt_in_dispatcher.jsp?partner=debit&VAA=B")
58
+ expect(decision.authen_required.md).to eq("0000000000000000000022")
59
+ expect(decision.authen_required.pareq).to eq("eJxVUm1v2yAQ/itWv8dg/B5dmJyfw==")
60
+
61
+
37
62
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
63
  end
39
64
  end
@@ -46,7 +71,73 @@ describe 'Decision' do
46
71
 
47
72
  describe 'test attribute "result"' do
48
73
  it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ decision = convert_decision '
75
+ {
76
+ "AuthResponse": {
77
+ "amount": 5500,
78
+ "atrn": "atrn1",
79
+ "atsd": "a",
80
+ "authcode": "12345",
81
+ "authen_result": "R",
82
+ "authorised": true,
83
+ "avs_result": "G",
84
+ "bin_commercial": false,
85
+ "bin_debit": false,
86
+ "bin_description": "bin_desc",
87
+ "cavv": "cavvvvvvvvvvvvv",
88
+ "context": "20200812075906AAAGV4",
89
+ "csc_result": "C",
90
+ "currency": "GBP",
91
+ "datetime": "2020-08-12T07:59:11Z",
92
+ "eci": "0",
93
+ "identifier": "ident1",
94
+ "live": true,
95
+ "maskedpan": "400000******0002",
96
+ "merchantid": 12345,
97
+ "result": 1,
98
+ "result_code": "000",
99
+ "result_message": "System: Accepted Transaction",
100
+ "scheme": "VISA_BUSINESS",
101
+ "sha256": "abcdefg",
102
+ "trans_status": "P",
103
+ "transno": 74875
104
+ }
105
+ }
106
+ '
107
+ expect(decision.auth_response).to be_truthy
108
+ expect(decision.request_challenged).to be_nil
109
+ expect(decision.authen_required).to be_nil
110
+
111
+ response = decision.auth_response
112
+
113
+ expect(response).to be_instance_of(CityPayApiClient::AuthResponse)
114
+ expect(response.amount).to eq(5500)
115
+ expect(response.atrn).to eq("atrn1")
116
+ expect(response.atsd).to eq("a")
117
+ expect(response.authcode).to eq("12345")
118
+ expect(response.authen_result).to eq("R")
119
+ expect(response.authorised).to eq(true)
120
+ expect(response.avs_result).to eq("G")
121
+ expect(response.bin_commercial).to eq(false)
122
+ expect(response.bin_debit).to eq(false)
123
+ expect(response.bin_description).to eq("bin_desc")
124
+ expect(response.cavv).to eq("cavvvvvvvvvvvvv")
125
+ expect(response.context).to eq("20200812075906AAAGV4")
126
+ expect(response.csc_result).to eq("C")
127
+ expect(response.currency).to eq("GBP")
128
+ expect(response.datetime).to eq(DateTime.parse("2020-08-12T07:59:11Z"))
129
+ expect(response.eci).to eq("0")
130
+ expect(response.identifier).to eq("ident1")
131
+ expect(response.live).to eq(true)
132
+ expect(response.maskedpan).to eq("400000******0002")
133
+ expect(response.merchantid).to eq(12345)
134
+ expect(response.result).to eq(1)
135
+ expect(response.result_code).to eq("000")
136
+ expect(response.result_message).to eq("System: Accepted Transaction")
137
+ expect(response.scheme).to eq("VISA_BUSINESS")
138
+ expect(response.sha256).to eq("abcdefg")
139
+ expect(response.trans_status).to eq("P")
140
+ expect(response.transno).to eq(74875)
50
141
  end
51
142
  end
52
143
 
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -20,7 +19,31 @@ require 'date'
20
19
  describe 'ListMerchantsResponse' do
21
20
  before do
22
21
  # run before each test
23
- @instance = CityPayApiClient::ListMerchantsResponse.new
22
+ json = '
23
+ {
24
+ "ListMerchantsResponse": {
25
+ "client_name": "CityPay Demo",
26
+ "clientid": "PC123456",
27
+ "merchants": [
28
+ {
29
+ "currency": "GBP",
30
+ "merchantid": 12345678,
31
+ "name": "CityPay One",
32
+ "status": "T",
33
+ "status_label": "Test"
34
+ },
35
+ {
36
+ "currency": "GBP",
37
+ "merchantid": 87654321,
38
+ "name": "CityPay Two",
39
+ "status": "T",
40
+ "status_label": "Test"
41
+ }
42
+ ]
43
+ }
44
+ }'
45
+ data = JSON.parse(json, :symbolize_names => true)
46
+ @instance = CityPayApiClient::ApiClient.new.convert_to_type(data, "ListMerchantsResponse")
24
47
  end
25
48
 
26
49
  after do
@@ -34,19 +57,31 @@ describe 'ListMerchantsResponse' do
34
57
  end
35
58
  describe 'test attribute "client_name"' do
36
59
  it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
+ expect(@instance.client_name).to eq("CityPay Demo")
38
61
  end
39
62
  end
40
63
 
41
64
  describe 'test attribute "clientid"' do
42
65
  it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
66
+ expect(@instance.clientid).to eq("PC123456")
44
67
  end
45
68
  end
46
69
 
47
70
  describe 'test attribute "merchants"' do
48
71
  it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ expect(@instance.merchants.length).to eq(2)
73
+ i = @instance.merchants[0]
74
+ expect(i.currency).to eq('GBP')
75
+ expect(i.merchantid).to eq(12345678)
76
+ expect(i.name).to eq("CityPay One")
77
+ expect(i.status).to eq("T")
78
+ expect(i.status_label).to eq("Test")
79
+ ii = @instance.merchants[1]
80
+ expect(ii.currency).to eq('GBP')
81
+ expect(ii.merchantid).to eq(87654321)
82
+ expect(ii.name).to eq("CityPay Two")
83
+ expect(ii.status).to eq("T")
84
+ expect(ii.status_label).to eq("Test")
50
85
  end
51
86
  end
52
87
 
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT
@@ -3,7 +3,6 @@
3
3
 
4
4
  # This CityPay API is a HTTP RESTful payment API used for direct server to server transactional processing. It provides a number of payment mechanisms including: Internet, MOTO, Continuous Authority transaction processing, 3-D Secure decision handling using RFA Secure, Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids and Completion processing. The API is also capable of tokinsed payments using Card Holder Accounts. ## Compliance and Security <aside class=\"notice\"> Before we begin a reminder that your application will need to adhere to PCI-DSS standards to operate safely and to meet requirements set out by Visa and MasterCard and the PCI Security Standards Council including: </aside> * Data must be collected using TLS version 1.2 using [strong cryptography](#enabled-tls-ciphers). We will not accept calls to our API at lower grade encryption levels. We regularly scan our TLS endpoints for vulnerabilities and perform TLS assessments as part of our compliance program. * The application must not store sensitive card holder data (CHD) such as the card security code (CSC) or primary access number (PAN) * The application must not display the full card number on receipts, it is recommended to mask the PAN and show the last 4 digits. The API will return this for you for ease of receipt creation * If you are developing a website, you will be required to perform regular scans on the network where you host the application to meet your compliance obligations * You will be required to be PCI Compliant and the application must adhere to the security standard. Further information is available from [https://www.pcisecuritystandards.org/](https://www.pcisecuritystandards.org/) * The API verifies that the request is for a valid account and originates from a trusted source using the remote IP address. Our application firewalls analyse data that may be an attempt to break a large number of security common security vulnerabilities.
5
5
 
6
- The version of the OpenAPI document: 6.0.0
7
6
  Contact: support@citypay.com
8
7
  Generated by: https://openapi-generator.tech
9
8
  OpenAPI Generator version: 5.0.0-SNAPSHOT