Skip to content

Commit 6a97b5a

Browse files
Merge pull request #104 from CyberSource/feb-2024-release
Feb 2024 release
2 parents 4a2fec7 + 48ced09 commit 6a97b5a

File tree

39 files changed

+1159
-334
lines changed

39 files changed

+1159
-334
lines changed

README.md

Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
1+
12
# Ruby Client SDK for the CyberSource REST APIs
23

4+
## Description
5+
36
The CyberSource Ruby client provides convenient access to the [CyberSource REST API](https://developer.cybersource.com/api/reference/api-reference.html) from your Ruby application.
47

58
[![Version ][rubygems_badge]][rubygems]
69

710
[rubygems_badge]: https://badge.fury.io/rb/cybersource_rest_client.svg
811
[rubygems]: https://rubygems.org/gems/cybersource_rest_client
912

10-
## Requirements
13+
## System Requirements
1114

1215
* Ruby 2.5.0 or higher
13-
* [CyberSource Account](https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/registration.html)
14-
* [CyberSource API Keys](https://prod.developer.cybersource.com/api/developer-guides/dita-gettingstarted/registration/createCertSharedKey.html)
15-
16-
## Dependencies
17-
18-
* activesupport >= 6.0.3.2, < 8.0
19-
* interface 1.0.4
20-
* json 2.1.0
21-
* jwt 2.1.0
22-
* typhoeus 1.3.1
2316

2417
## Installation
2518

@@ -33,19 +26,23 @@ Be sure to always use HTTPS rubygems source in your gemfile and include the cybe
3326
end
3427
```
3528

36-
## Registration & Configuration
29+
## Account Registration and Configuration
3730

38-
Use of this SDK and the CyberSource APIs requires having an account on our system. You can find details of getting a test account and creating your keys [here](https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/registration.html)
31+
* Account Registration
3932

40-
Once you have your keys, simply load them into the appropriate variables in your code, as per the below sample code dealing with the authentication part of the API request.
33+
Follow the first step mentioned in [Getting Started with CyberSource REST SDKs](https://developer.cybersource.com/hello-world/rest-api-sdks.html#gettingstarted) to create a sandbox account.
4134

42-
Remember this SDK is for use in server-side Ruby applications that access the CyberSource REST API and credentials should always be securely stored and accessed appropriately.
35+
* Configuration
4336

44-
## SDK Usage Examples and Sample Code
37+
Follow the second step mentioned in [Getting Started with CyberSource REST SDKs](https://developer.cybersource.com/hello-world/rest-api-sdks.html#gettingstarted) to configure the SDK by inputting your credentials.
38+
39+
***Please note that this is for reference only. Ensure to store the credentials in a more secure manner.***
40+
41+
## How to Use
4542

4643
To get started using this SDK, it's highly recommended to download our sample code repository:
4744

48-
* [CyberSource Ruby Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-ruby)
45+
* [Cybersource Ruby Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-ruby)
4946

5047
In that respository, we have comprehensive sample code for all common uses of our API:
5148

@@ -55,15 +52,14 @@ Additionally, you can find details and examples of how our API is structured in
5552

5653
The API Reference Guide provides examples of what information is needed for a particular request and how that information would be formatted. Using those examples, you can easily determine what methods would be necessary to include that information in a request using this SDK.
5754

58-
## MetaKey Support
59-
60-
A Meta Key is a single key that can be used by one, some, or all merchants (or accounts, if created by a Portfolio user) in the portfolio.
61-
62-
The Portfolio or Parent Account owns the key and is considered the transaction submitter when a Meta Key is used, while the merchant owns the transaction.
55+
### SDK Usage Examples and Sample Code
6356

64-
MIDs continue to be able to create keys for themselves, even if a Meta Key is generated.
57+
* Install the CyberSource Ruby SDK and add the SDK to your GemFile.
58+
* Configure your credentials in [MerchantConfiguration](https://github.com/CyberSource/cybersource-rest-samples-ruby/blob/21be3e94c9144ce217ae20ef476425d384aadc31/data/Configuration.rb#L5C3-L67C6).
59+
* Create an instance of [ApiClient](https://github.com/CyberSource/cybersource-rest-samples-ruby/blob/21be3e94c9144ce217ae20ef476425d384aadc31/Samples/Payments/Payments/simple-authorizationinternet.rb#L46C9-L46C48).
60+
* Use the created ApiClient instance and MerchantConfiguration to call CyberSource APIs. For example [SimpleAuthorizationInternet](https://github.com/CyberSource/cybersource-rest-samples-ruby/blob/21be3e94c9144ce217ae20ef476425d384aadc31/Samples/Payments/Payments/simple-authorizationinternet.rb#L46C9-L46C48)
6561

66-
Further information on MetaKey can be found in [New Business Center User Guide](https://developer.cybersource.com/library/documentation/dev_guides/Business_Center/New_Business_Center_User_Guide.pdf).
62+
For more detailed examples, refer to the [cybersource-rest-samples-ruby](https://github.com/CyberSource/cybersource-rest-samples-ruby) repository.
6763

6864
### Switching between the sandbox environment and the production environment
6965

@@ -78,10 +74,34 @@ CyberSource maintains a complete sandbox environment for testing and development
7874

7975
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
8076

81-
## License
77+
## Features
8278

83-
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.
79+
### MetaKey Support
80+
81+
A Meta Key is a single key that can be used by one, some, or all merchants (or accounts, if created by a Portfolio user) in the portfolio.
82+
83+
The Portfolio or Parent Account owns the key and is considered the transaction submitter when a Meta Key is used, while the merchant owns the transaction.
84+
85+
MIDs continue to be able to create keys for themselves, even if a Meta Key is generated.
86+
87+
Further information on MetaKey can be found in [New Business Center User Guide](https://developer.cybersource.com/library/documentation/dev_guides/Business_Center/New_Business_Center_User_Guide.pdf).
88+
89+
90+
## How to Contribute
91+
92+
* Fork the repo and create your branch from `master`.
93+
* If you've added code that should be tested, add tests.
94+
* Ensure the test suite passes.
95+
* Submit your pull request! (Ensure you have [synced your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) with the original repository before initiating the PR).
96+
97+
## Need Help?
98+
99+
For any help, you can reach out to us at our [Discussion Forum](https://community.developer.cybersource.com/t5/cybersource-APIs/bd-p/api).
84100

85101
## Disclaimer
86102

87-
Cybersource may allow Customer to access, use, and/or test a Cybersource product or service that may still be in development or has not been market-tested (“Beta Product”) solely for the purpose of evaluating the functionality or marketability of the Beta Product (a “Beta Evaluation”). Notwithstanding any language to the contrary, the following terms shall apply with respect to Customer’s participation in any Beta Evaluation (and the Beta Product(s)) accessed thereunder): The Parties will enter into a separate form agreement detailing the scope of the Beta Evaluation, requirements, pricing, the length of the beta evaluation period (“Beta Product Form”). Beta Products are not, and may not become, Transaction Services and have not yet been publicly released and are offered for the sole purpose of internal testing and non-commercial evaluation. Customer’s use of the Beta Product shall be solely for the purpose of conducting the Beta Evaluation. Customer accepts all risks arising out of the access and use of the Beta Products. Cybersource may, in its sole discretion, at any time, terminate or discontinue the Beta Evaluation. Customer acknowledges and agrees that any Beta Product may still be in development and that Beta Product is provided “AS IS” and may not perform at the level of a commercially available service, may not operate as expected and may be modified prior to release. CYBERSOURCE SHALL NOT BE RESPONSIBLE OR LIABLE UNDER ANY CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE RELATING TO A BETA PRODUCT OR THE BETA EVALUATION (A) FOR LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (B) ANY CLAIM, LOSSES, DAMAGES, OR CAUSE OF ACTION ARISING IN CONNECTION WITH THE BETA PRODUCT; OR (C) FOR ANY INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES AND LOSS OF PROFITS.
103+
CyberSource may allow Customer to access, use, and/or test a CyberSource product or service that may still be in development or has not been market-tested (“Beta Product”) solely for the purpose of evaluating the functionality or marketability of the Beta Product (a “Beta Evaluation”). Notwithstanding any language to the contrary, the following terms shall apply with respect to Customer’s participation in any Beta Evaluation (and the Beta Product(s)) accessed thereunder): The Parties will enter into a separate form agreement detailing the scope of the Beta Evaluation, requirements, pricing, the length of the beta evaluation period (“Beta Product Form”). Beta Products are not, and may not become, Transaction Services and have not yet been publicly released and are offered for the sole purpose of internal testing and non-commercial evaluation. Customer’s use of the Beta Product shall be solely for the purpose of conducting the Beta Evaluation. Customer accepts all risks arising out of the access and use of the Beta Products. CyberSource may, in its sole discretion, at any time, terminate or discontinue the Beta Evaluation. Customer acknowledges and agrees that any Beta Product may still be in development and that Beta Product is provided “AS IS” and may not perform at the level of a commercially available service, may not operate as expected and may be modified prior to release. CYBERSOURCE SHALL NOT BE RESPONSIBLE OR LIABLE UNDER ANY CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE RELATING TO A BETA PRODUCT OR THE BETA EVALUATION (A) FOR LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (B) ANY CLAIM, LOSSES, DAMAGES, OR CAUSE OF ACTION ARISING IN CONNECTION WITH THE BETA PRODUCT; OR (C) FOR ANY INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES AND LOSS OF PROFITS.
104+
105+
## License
106+
107+
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.

cybersource_rest_client.gemspec

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require "cybersource_rest_client/version"
1717

1818
Gem::Specification.new do |s|
1919
s.name = "cybersource_rest_client"
20-
s.version = "0.0.57"
20+
s.version = "0.0.58"
2121
s.platform = Gem::Platform::RUBY
2222
s.authors = ["CyberSource"]
2323
s.email = ["cybersourcedev@gmail.com"]
@@ -28,19 +28,19 @@ Gem::Specification.new do |s|
2828
s.files = Dir.glob("{lib}/{cybersource_rest_client}/**/*") + Dir.glob("{lib}/{AuthenticationSDK}/authentication/**/*") + Dir.glob("{lib}/{AuthenticationSDK}/core/**/*") + Dir.glob("{lib}/{AuthenticationSDK}/util/**/*") + Dir.glob("{lib}/{AuthenticationSDK}/logging/**/*") + Dir.glob("{lib}/cybersource_rest_client.rb")
2929
s.required_ruby_version = ">= 1.9"
3030

31-
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
32-
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
31+
s.add_runtime_dependency 'typhoeus', '~> 1.4', '>= 1.4.0'
32+
s.add_runtime_dependency 'json', '~> 2.7', '>= 2.7.0'
3333
s.add_runtime_dependency 'activesupport', '>= 6.0.3.2', '< 8.0'
34-
s.add_runtime_dependency 'interface','~> 1.0', '>= 1.0.4'
34+
s.add_runtime_dependency 'interface','~> 1.0', '>= 1.0.5'
3535
s.add_runtime_dependency 'jwt', '2.7.0'
36-
s.add_runtime_dependency 'addressable', '~> 2.3', '>= 2.3.0'
36+
s.add_runtime_dependency 'addressable', '~> 2.8', '>= 2.8.0'
3737
s.add_runtime_dependency 'time', '~> 0.2.2'
3838
s.add_runtime_dependency 'jose', '~> 1.1'
3939

4040
s.add_development_dependency 'rubocop', '~> 0.57.2'
41-
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
42-
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
43-
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
41+
s.add_development_dependency 'rspec', '~> 3.12', '>= 3.12.0'
42+
s.add_development_dependency 'vcr', '~> 5.0', '>= 5.0.0'
43+
s.add_development_dependency 'webmock', '~> 3.19', '>= 3.19.0'
4444
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
4545
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
4646
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'

docs/CheckPayerAuthEnrollmentRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**buyer_information** | [**Riskv1authenticationsBuyerInformation**](Riskv1authenticationsBuyerInformation.md) | | [optional]
1212
**device_information** | [**Riskv1authenticationsDeviceInformation**](Riskv1authenticationsDeviceInformation.md) | | [optional]
1313
**merchant_information** | [**Riskv1decisionsMerchantInformation**](Riskv1decisionsMerchantInformation.md) | | [optional]
14-
**acquirer_information** | [**Ptsv2paymentsAcquirerInformation**](Ptsv2paymentsAcquirerInformation.md) | | [optional]
14+
**acquirer_information** | [**Riskv1decisionsAcquirerInformation**](Riskv1decisionsAcquirerInformation.md) | | [optional]
1515
**recurring_payment_information** | [**Ptsv2paymentsRecurringPaymentInformation**](Ptsv2paymentsRecurringPaymentInformation.md) | | [optional]
1616
**consumer_authentication_information** | [**Riskv1decisionsConsumerAuthenticationInformation**](Riskv1decisionsConsumerAuthenticationInformation.md) | | [optional]
1717
**risk_information** | [**Riskv1authenticationsRiskInformation**](Riskv1authenticationsRiskInformation.md) | | [optional]

docs/CreateBundledDecisionManagerCaseRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
1414
**travel_information** | [**Riskv1decisionsTravelInformation**](Riskv1decisionsTravelInformation.md) | | [optional]
1515
**merchant_defined_information** | [**Array&lt;Riskv1decisionsMerchantDefinedInformation&gt;**](Riskv1decisionsMerchantDefinedInformation.md) | | [optional]
1616
**merchant_information** | [**Riskv1decisionsMerchantInformation**](Riskv1decisionsMerchantInformation.md) | | [optional]
17-
**acquirer_information** | [**Ptsv2paymentsAcquirerInformation**](Ptsv2paymentsAcquirerInformation.md) | | [optional]
17+
**acquirer_information** | [**Riskv1decisionsAcquirerInformation**](Riskv1decisionsAcquirerInformation.md) | | [optional]
1818
**recurring_payment_information** | [**Ptsv2paymentsRecurringPaymentInformation**](Ptsv2paymentsRecurringPaymentInformation.md) | | [optional]
1919
**consumer_authentication_information** | [**Riskv1decisionsConsumerAuthenticationInformation**](Riskv1decisionsConsumerAuthenticationInformation.md) | | [optional]
2020
**watchlist_screening_information** | [**Ptsv2paymentsWatchlistScreeningInformation**](Ptsv2paymentsWatchlistScreeningInformation.md) | | [optional]

docs/InvoicingV2InvoicesAllGet404Response.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**submit_time_utc** | **String** | Time of request in UTC. Format: &#x60;YYYY-MM-DDThh:mm:ssZ&#x60; **Example** &#x60;2016-08-11T22:47:57Z&#x60; equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The &#x60;T&#x60; separates the date and the time. The &#x60;Z&#x60; indicates UTC. Returned by Cybersource for all services. | [optional]
7-
**status** | **String** | The status of the invoice. Possible values: - NOTFOUND | [optional]
7+
**status** | **String** | The status of the invoice. Possible values: - NOTFOUND | [optional]
88
**reason** | **String** | The reason of the status. Possible values: - MISSING_FIELD - INVALID_DATA - DUPLICATE_REQUEST - INVALID_MERCHANT_CONFIGURATION - PROCESSOR_UNAVAILABLE | [optional]
99
**message** | **String** | The detail message related to the status and reason listed above. | [optional]
1010
**details** | [**Array&lt;PtsV2PaymentsPost201ResponseErrorInformationDetails&gt;**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional]

docs/PostPaymentCredentialsRequest.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# CyberSource::PostPaymentCredentialsRequest
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**payment_credential_type** | **String** | The type of payment credentials to be returned. By default, payment credentials include network token and cryptogram or dynamic CVV. If \&quot;NETWORK_TOKEN\&quot; is supplied then only network token will be returned and cryptogram or dynamic CVV will be excluded. Possible Values: - NETWORK_TOKEN | [optional]
7+
8+

docs/PtsV2PaymentsCapturesPost201Response.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
**_links** | [**PtsV2PaymentsCapturesPost201ResponseLinks**](PtsV2PaymentsCapturesPost201ResponseLinks.md) | | [optional]
77
**id** | **String** | An unique identification number generated by Cybersource to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response. | [optional]
88
**submit_time_utc** | **String** | Time of request in UTC. Format: &#x60;YYYY-MM-DDThh:mm:ssZ&#x60; **Example** &#x60;2016-08-11T22:47:57Z&#x60; equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The &#x60;T&#x60; separates the date and the time. The &#x60;Z&#x60; indicates UTC. Returned by Cybersource for all services. | [optional]
9-
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING | [optional]
9+
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING - TRANSMITTED (Only for Online Capture enabled merchants) | [optional]
1010
**reconciliation_id** | **String** | Reference number for the transaction. Depending on how your Cybersource account is configured, this value could either be provided in the API request or generated by CyberSource. The actual value used in the request to the processor is provided back to you by Cybersource in the response. | [optional]
1111
**client_reference_information** | [**PtsV2PaymentsPost201ResponseClientReferenceInformation**](PtsV2PaymentsPost201ResponseClientReferenceInformation.md) | | [optional]
1212
**processor_information** | [**PtsV2PaymentsCapturesPost201ResponseProcessorInformation**](PtsV2PaymentsCapturesPost201ResponseProcessorInformation.md) | | [optional]

docs/PtsV2PaymentsCapturesPost201ResponseProcessorInformation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**transaction_id** | **String** | Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID &#x3D; 66012345 - Shift number &#x3D; 001 - Batch number &#x3D; 069 - Transaction number &#x3D; 003 | [optional]
7+
**network_transaction_id** | **String** | Network Transaction Identifier Applicable for online capture transactions only. | [optional]
78

89

docs/PtsV2PaymentsPost201ResponseEmbeddedActionsCAPTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING | [optional]
6+
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING - TRANSMITTED (Only for Online Capture enabled merchants) | [optional]
77
**reason** | **String** | The reason of the status. Possible values: - MISSING_FIELD - INVALID_DATA - DUPLICATE_REQUEST - INVALID_MERCHANT_CONFIGURATION - EXCEEDS_AUTH_AMOUNT - AUTH_ALREADY_REVERSED - TRANSACTION_ALREADY_SETTLED - INVALID_AMOUNT - MISSING_AUTH - TRANSACTION_ALREADY_REVERSED_OR_SETTLED - NOT_SUPPORTED | [optional]
88
**message** | **String** | The detail message related to the status and reason listed above. | [optional]
99

0 commit comments

Comments
 (0)