apimatic-cp-sdk 0.0.1
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/LICENSE +28 -0
- data/README.md +178 -0
- data/bin/console +15 -0
- data/lib/cell_point_api/api_helper.rb +10 -0
- data/lib/cell_point_api/apis/apple_pay_api.rb +51 -0
- data/lib/cell_point_api/apis/authentication_api.rb +81 -0
- data/lib/cell_point_api/apis/base_api.rb +67 -0
- data/lib/cell_point_api/apis/bulk_api.rb +93 -0
- data/lib/cell_point_api/apis/cards_api.rb +104 -0
- data/lib/cell_point_api/apis/notes_api.rb +66 -0
- data/lib/cell_point_api/apis/oauth_authorization_api.rb +44 -0
- data/lib/cell_point_api/apis/orders_api.rb +483 -0
- data/lib/cell_point_api/apis/payment_methods_api.rb +57 -0
- data/lib/cell_point_api/apis/proxy_api.rb +91 -0
- data/lib/cell_point_api/apis/transactions_api.rb +546 -0
- data/lib/cell_point_api/apis/wallet_api.rb +39 -0
- data/lib/cell_point_api/client.rb +145 -0
- data/lib/cell_point_api/configuration.rb +180 -0
- data/lib/cell_point_api/events/callbacks/callbacks_handler.rb +37 -0
- data/lib/cell_point_api/events/unknown_event.rb +32 -0
- data/lib/cell_point_api/exceptions/api_exception.rb +21 -0
- data/lib/cell_point_api/exceptions/oauth_provider_exception.rb +64 -0
- data/lib/cell_point_api/exceptions/problem_exception.rb +75 -0
- data/lib/cell_point_api/http/api_response.rb +19 -0
- data/lib/cell_point_api/http/auth/cpd_issued_jwt.rb +156 -0
- data/lib/cell_point_api/http/auth/merchant_issued_jwt.rb +53 -0
- data/lib/cell_point_api/http/http_call_back.rb +10 -0
- data/lib/cell_point_api/http/http_method_enum.rb +10 -0
- data/lib/cell_point_api/http/http_request.rb +10 -0
- data/lib/cell_point_api/http/http_response.rb +10 -0
- data/lib/cell_point_api/http/proxy_settings.rb +22 -0
- data/lib/cell_point_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/cell_point_api/logging/sdk_logger.rb +17 -0
- data/lib/cell_point_api/models/account.rb +168 -0
- data/lib/cell_point_api/models/account_status.rb +52 -0
- data/lib/cell_point_api/models/account_type.rb +44 -0
- data/lib/cell_point_api/models/action_base.rb +74 -0
- data/lib/cell_point_api/models/action_completion_response.rb +77 -0
- data/lib/cell_point_api/models/action_result_status.rb +40 -0
- data/lib/cell_point_api/models/action_type.rb +36 -0
- data/lib/cell_point_api/models/activity.rb +244 -0
- data/lib/cell_point_api/models/activity_data.rb +127 -0
- data/lib/cell_point_api/models/address_verification_status.rb +56 -0
- data/lib/cell_point_api/models/airline_ancillary.rb +244 -0
- data/lib/cell_point_api/models/airline_ancillary_data.rb +120 -0
- data/lib/cell_point_api/models/airline_fare.rb +348 -0
- data/lib/cell_point_api/models/airline_fare_data.rb +217 -0
- data/lib/cell_point_api/models/airline_industry_data.rb +152 -0
- data/lib/cell_point_api/models/airport.rb +144 -0
- data/lib/cell_point_api/models/amount.rb +105 -0
- data/lib/cell_point_api/models/ancillary_details.rb +366 -0
- data/lib/cell_point_api/models/apple_pay_config.rb +83 -0
- data/lib/cell_point_api/models/apple_pay_instrument_apple_pay_node.rb +119 -0
- data/lib/cell_point_api/models/apple_pay_payment_instrument.rb +123 -0
- data/lib/cell_point_api/models/apple_tokenized_token.rb +143 -0
- data/lib/cell_point_api/models/audience.rb +36 -0
- data/lib/cell_point_api/models/authorization.rb +145 -0
- data/lib/cell_point_api/models/authorization_group.rb +99 -0
- data/lib/cell_point_api/models/authorization_group1.rb +216 -0
- data/lib/cell_point_api/models/authorization_group_full.rb +193 -0
- data/lib/cell_point_api/models/authorize_order_by_id_post201_response.rb +128 -0
- data/lib/cell_point_api/models/auto_rental.rb +195 -0
- data/lib/cell_point_api/models/auto_rental_data.rb +76 -0
- data/lib/cell_point_api/models/auto_rental_industry_data.rb +182 -0
- data/lib/cell_point_api/models/base_model.rb +110 -0
- data/lib/cell_point_api/models/bin.rb +73 -0
- data/lib/cell_point_api/models/breadcrumb.rb +86 -0
- data/lib/cell_point_api/models/browser_info.rb +114 -0
- data/lib/cell_point_api/models/bundle.rb +195 -0
- data/lib/cell_point_api/models/bundled_activity.rb +229 -0
- data/lib/cell_point_api/models/bundled_airline_ancillary.rb +226 -0
- data/lib/cell_point_api/models/bundled_airline_fare.rb +330 -0
- data/lib/cell_point_api/models/bundled_auto_rental.rb +176 -0
- data/lib/cell_point_api/models/bundled_discount.rb +132 -0
- data/lib/cell_point_api/models/bundled_item_base.rb +123 -0
- data/lib/cell_point_api/models/bundled_lodging_reservation.rb +176 -0
- data/lib/cell_point_api/models/bundled_product.rb +161 -0
- data/lib/cell_point_api/models/buyer.rb +129 -0
- data/lib/cell_point_api/models/buyer_fingerprint.rb +125 -0
- data/lib/cell_point_api/models/buyer_history.rb +199 -0
- data/lib/cell_point_api/models/cancel.rb +109 -0
- data/lib/cell_point_api/models/cancelled_payment_transactions.rb +84 -0
- data/lib/cell_point_api/models/capabilities.rb +77 -0
- data/lib/cell_point_api/models/capture.rb +84 -0
- data/lib/cell_point_api/models/capture_payment_response.rb +159 -0
- data/lib/cell_point_api/models/card.rb +131 -0
- data/lib/cell_point_api/models/card_config.rb +105 -0
- data/lib/cell_point_api/models/card_identification.rb +126 -0
- data/lib/cell_point_api/models/card_instrument_card_node.rb +232 -0
- data/lib/cell_point_api/models/card_number.rb +122 -0
- data/lib/cell_point_api/models/card_payment_instrument.rb +136 -0
- data/lib/cell_point_api/models/card_scheme.rb +63 -0
- data/lib/cell_point_api/models/card_scheme_configuration.rb +87 -0
- data/lib/cell_point_api/models/carrier.rb +82 -0
- data/lib/cell_point_api/models/category.rb +36 -0
- data/lib/cell_point_api/models/client_assertion.rb +135 -0
- data/lib/cell_point_api/models/close.rb +89 -0
- data/lib/cell_point_api/models/close_refund_response.rb +73 -0
- data/lib/cell_point_api/models/closed_payment_transactions.rb +83 -0
- data/lib/cell_point_api/models/codeshare.rb +87 -0
- data/lib/cell_point_api/models/complete_person_name.rb +120 -0
- data/lib/cell_point_api/models/completion_redirect.rb +93 -0
- data/lib/cell_point_api/models/configuration.rb +86 -0
- data/lib/cell_point_api/models/contact_data.rb +82 -0
- data/lib/cell_point_api/models/cpu.rb +74 -0
- data/lib/cell_point_api/models/device_os.rb +60 -0
- data/lib/cell_point_api/models/discount.rb +150 -0
- data/lib/cell_point_api/models/discount_data.rb +83 -0
- data/lib/cell_point_api/models/driver.rb +86 -0
- data/lib/cell_point_api/models/external_transaction.rb +227 -0
- data/lib/cell_point_api/models/externally_tokenized_card.rb +81 -0
- data/lib/cell_point_api/models/failover.rb +105 -0
- data/lib/cell_point_api/models/failure_category.rb +62 -0
- data/lib/cell_point_api/models/failure_module.rb +58 -0
- data/lib/cell_point_api/models/fingerprint.rb +82 -0
- data/lib/cell_point_api/models/fraud_assessment.rb +163 -0
- data/lib/cell_point_api/models/fulfilled_activity.rb +207 -0
- data/lib/cell_point_api/models/fulfilled_airline_ancillary.rb +207 -0
- data/lib/cell_point_api/models/fulfilled_airline_fare.rb +207 -0
- data/lib/cell_point_api/models/fulfilled_auto_rental.rb +207 -0
- data/lib/cell_point_api/models/fulfilled_bundle.rb +207 -0
- data/lib/cell_point_api/models/fulfilled_discount.rb +178 -0
- data/lib/cell_point_api/models/fulfilled_line_item_base.rb +177 -0
- data/lib/cell_point_api/models/fulfilled_lodging_reservation.rb +207 -0
- data/lib/cell_point_api/models/fulfilled_order.rb +148 -0
- data/lib/cell_point_api/models/fulfilled_product.rb +207 -0
- data/lib/cell_point_api/models/fulfilled_tax_line.rb +162 -0
- data/lib/cell_point_api/models/fulfillment_data.rb +90 -0
- data/lib/cell_point_api/models/fulfillment_status.rb +41 -0
- data/lib/cell_point_api/models/funding_type.rb +40 -0
- data/lib/cell_point_api/models/gender.rb +40 -0
- data/lib/cell_point_api/models/hpp_data.rb +155 -0
- data/lib/cell_point_api/models/identifying_document.rb +159 -0
- data/lib/cell_point_api/models/identifying_document_type.rb +60 -0
- data/lib/cell_point_api/models/industry_data.rb +124 -0
- data/lib/cell_point_api/models/informational_price_row.rb +97 -0
- data/lib/cell_point_api/models/informational_price_section.rb +104 -0
- data/lib/cell_point_api/models/itinerary_type.rb +47 -0
- data/lib/cell_point_api/models/journey_segment.rb +83 -0
- data/lib/cell_point_api/models/line_item_base.rb +101 -0
- data/lib/cell_point_api/models/line_item_type.rb +60 -0
- data/lib/cell_point_api/models/links.rb +86 -0
- data/lib/cell_point_api/models/location.rb +153 -0
- data/lib/cell_point_api/models/lodging_industry_data.rb +216 -0
- data/lib/cell_point_api/models/lodging_reservation.rb +195 -0
- data/lib/cell_point_api/models/lodging_reservation_data.rb +76 -0
- data/lib/cell_point_api/models/loyalty_account.rb +103 -0
- data/lib/cell_point_api/models/network_info.rb +76 -0
- data/lib/cell_point_api/models/non_negative_amount.rb +105 -0
- data/lib/cell_point_api/models/non_positive_amount.rb +105 -0
- data/lib/cell_point_api/models/note.rb +139 -0
- data/lib/cell_point_api/models/note_request.rb +90 -0
- data/lib/cell_point_api/models/oauth_provider_error.rb +62 -0
- data/lib/cell_point_api/models/oauth_scope_cpd_issued_jwt.rb +158 -0
- data/lib/cell_point_api/models/oauth_token.rb +96 -0
- data/lib/cell_point_api/models/order.rb +414 -0
- data/lib/cell_point_api/models/order_canceled_reason.rb +56 -0
- data/lib/cell_point_api/models/order_core.rb +343 -0
- data/lib/cell_point_api/models/order_extended.rb +150 -0
- data/lib/cell_point_api/models/order_payment_summary.rb +117 -0
- data/lib/cell_point_api/models/order_status.rb +161 -0
- data/lib/cell_point_api/models/order_status_type.rb +58 -0
- data/lib/cell_point_api/models/order_transactions.rb +88 -0
- data/lib/cell_point_api/models/owner.rb +131 -0
- data/lib/cell_point_api/models/page_type.rb +26 -0
- data/lib/cell_point_api/models/passenger.rb +229 -0
- data/lib/cell_point_api/models/password_change_type.rb +41 -0
- data/lib/cell_point_api/models/pay_pal_action.rb +129 -0
- data/lib/cell_point_api/models/pay_pal_payment_instrument.rb +88 -0
- data/lib/cell_point_api/models/payment_data.rb +102 -0
- data/lib/cell_point_api/models/payment_data_header.rb +94 -0
- data/lib/cell_point_api/models/payment_data_version.rb +26 -0
- data/lib/cell_point_api/models/payment_field.rb +68 -0
- data/lib/cell_point_api/models/payment_instrument_base.rb +87 -0
- data/lib/cell_point_api/models/payment_method.rb +52 -0
- data/lib/cell_point_api/models/payment_methods_for_order_get200_response.rb +157 -0
- data/lib/cell_point_api/models/payment_methods_search_vouchers_post200_response.rb +82 -0
- data/lib/cell_point_api/models/payment_processor.rb +121 -0
- data/lib/cell_point_api/models/payment_status.rb +122 -0
- data/lib/cell_point_api/models/payment_transaction.rb +605 -0
- data/lib/cell_point_api/models/payment_transaction_authorized_amount.rb +105 -0
- data/lib/cell_point_api/models/payment_transaction_canceled_amount.rb +105 -0
- data/lib/cell_point_api/models/payment_transaction_captured_amount.rb +105 -0
- data/lib/cell_point_api/models/payment_transaction_pending_authorize_amount.rb +106 -0
- data/lib/cell_point_api/models/payment_transaction_pending_cancel_amount.rb +106 -0
- data/lib/cell_point_api/models/payment_transaction_pending_capture_amount.rb +106 -0
- data/lib/cell_point_api/models/payment_transaction_processing_fee.rb +106 -0
- data/lib/cell_point_api/models/payment_transaction_refunded_amount.rb +105 -0
- data/lib/cell_point_api/models/payments_v1_bulks_response.rb +74 -0
- data/lib/cell_point_api/models/payments_v1_orders_payments_retry_failed_refunds_request.rb +74 -0
- data/lib/cell_point_api/models/payments_v1_refunds_closures_request.rb +74 -0
- data/lib/cell_point_api/models/payments_v1_refunds_retry_failed_refunds_request.rb +74 -0
- data/lib/cell_point_api/models/payments_v1_schemes_response.rb +76 -0
- data/lib/cell_point_api/models/paypal_config.rb +94 -0
- data/lib/cell_point_api/models/person.rb +161 -0
- data/lib/cell_point_api/models/person_name.rb +89 -0
- data/lib/cell_point_api/models/phone.rb +132 -0
- data/lib/cell_point_api/models/pk_payment_method.rb +111 -0
- data/lib/cell_point_api/models/pk_payment_token.rb +94 -0
- data/lib/cell_point_api/models/postal_address.rb +217 -0
- data/lib/cell_point_api/models/price_summary.rb +191 -0
- data/lib/cell_point_api/models/product.rb +179 -0
- data/lib/cell_point_api/models/product_data.rb +104 -0
- data/lib/cell_point_api/models/property.rb +110 -0
- data/lib/cell_point_api/models/provider.rb +129 -0
- data/lib/cell_point_api/models/psp.rb +26 -0
- data/lib/cell_point_api/models/redirect_action.rb +116 -0
- data/lib/cell_point_api/models/refund_item.rb +310 -0
- data/lib/cell_point_api/models/refund_method.rb +36 -0
- data/lib/cell_point_api/models/refund_order_group_post201_response.rb +91 -0
- data/lib/cell_point_api/models/refund_reason.rb +104 -0
- data/lib/cell_point_api/models/refund_request.rb +161 -0
- data/lib/cell_point_api/models/refund_status.rb +44 -0
- data/lib/cell_point_api/models/refund_transaction.rb +311 -0
- data/lib/cell_point_api/models/refund_transaction_amount.rb +105 -0
- data/lib/cell_point_api/models/refund_type.rb +38 -0
- data/lib/cell_point_api/models/related_payment.rb +106 -0
- data/lib/cell_point_api/models/related_refund.rb +106 -0
- data/lib/cell_point_api/models/rental_location.rb +226 -0
- data/lib/cell_point_api/models/retry_refund_response.rb +73 -0
- data/lib/cell_point_api/models/reward.rb +101 -0
- data/lib/cell_point_api/models/room.rb +100 -0
- data/lib/cell_point_api/models/sales_channel.rb +36 -0
- data/lib/cell_point_api/models/save_pk_payment_token_request.rb +83 -0
- data/lib/cell_point_api/models/save_wallet_payment_token_request.rb +83 -0
- data/lib/cell_point_api/models/screen.rb +97 -0
- data/lib/cell_point_api/models/search_vouchers_request.rb +119 -0
- data/lib/cell_point_api/models/security_code.rb +83 -0
- data/lib/cell_point_api/models/security_code_match_status.rb +50 -0
- data/lib/cell_point_api/models/status.rb +43 -0
- data/lib/cell_point_api/models/status1.rb +52 -0
- data/lib/cell_point_api/models/summary.rb +82 -0
- data/lib/cell_point_api/models/tax.rb +134 -0
- data/lib/cell_point_api/models/taxes_and_fees_breakdown_page.rb +82 -0
- data/lib/cell_point_api/models/token_post200_response.rb +96 -0
- data/lib/cell_point_api/models/tokenized_card.rb +229 -0
- data/lib/cell_point_api/models/tokenized_card_with_contact_data.rb +247 -0
- data/lib/cell_point_api/models/tokenized_data.rb +169 -0
- data/lib/cell_point_api/models/total_row.rb +83 -0
- data/lib/cell_point_api/models/transaction_action.rb +108 -0
- data/lib/cell_point_api/models/transaction_action_result.rb +94 -0
- data/lib/cell_point_api/models/transaction_base.rb +132 -0
- data/lib/cell_point_api/models/transaction_failure.rb +222 -0
- data/lib/cell_point_api/models/travel_journey.rb +139 -0
- data/lib/cell_point_api/models/travel_leg.rb +194 -0
- data/lib/cell_point_api/models/trigger_bulk_request.rb +83 -0
- data/lib/cell_point_api/models/type.rb +67 -0
- data/lib/cell_point_api/models/type1.rb +47 -0
- data/lib/cell_point_api/models/type2.rb +40 -0
- data/lib/cell_point_api/models/type3.rb +41 -0
- data/lib/cell_point_api/models/type4.rb +56 -0
- data/lib/cell_point_api/models/type5.rb +78 -0
- data/lib/cell_point_api/models/uplift_config.rb +73 -0
- data/lib/cell_point_api/models/uplift_payment_instrument.rb +102 -0
- data/lib/cell_point_api/models/vehicle.rb +139 -0
- data/lib/cell_point_api/models/voucher_config.rb +92 -0
- data/lib/cell_point_api/models/voucher_issuer.rb +26 -0
- data/lib/cell_point_api/models/voucher_payment_instrument.rb +233 -0
- data/lib/cell_point_api/models/voucher_payment_instrument_node.rb +198 -0
- data/lib/cell_point_api/models/voucher_type.rb +36 -0
- data/lib/cell_point_api/models/wallet_instrument_wallet_node.rb +136 -0
- data/lib/cell_point_api/models/wallet_payment_instrument.rb +123 -0
- data/lib/cell_point_api/models/wallet_tokenized_token.rb +148 -0
- data/lib/cell_point_api/models/wallet_tokenized_token_identification.rb +75 -0
- data/lib/cell_point_api/models/wallet_type.rb +36 -0
- data/lib/cell_point_api/utilities/date_time_helper.rb +11 -0
- data/lib/cell_point_api/utilities/file_wrapper.rb +28 -0
- data/lib/cell_point_api/utilities/union_type_lookup.rb +260 -0
- data/lib/cell_point_api.rb +301 -0
- metadata +354 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# cell_point_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module CellPointApi
|
|
7
|
+
# Details about a failure that happened on a transaction.
|
|
8
|
+
class TransactionFailure < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Which business module the failure happened in.
|
|
13
|
+
# <table>
|
|
14
|
+
# <thead>
|
|
15
|
+
# <tr>
|
|
16
|
+
# <th>Module</th>
|
|
17
|
+
# <th>Description</th>
|
|
18
|
+
# </tr>
|
|
19
|
+
# </thead>
|
|
20
|
+
# <tbody>
|
|
21
|
+
# <tr>
|
|
22
|
+
# <td>PRE_AUTHORIZATION</td>
|
|
23
|
+
# <td>Failure happened during pre-authorization checks.</td>
|
|
24
|
+
# </tr>
|
|
25
|
+
# <tr>
|
|
26
|
+
# <td>PAYMENT_PROCESSOR</td>
|
|
27
|
+
# <td>Failure happened when processing the payment.</td>
|
|
28
|
+
#
|
|
29
|
+
# </tr>
|
|
30
|
+
# <tr>
|
|
31
|
+
# <td>FOREIGN_EXCHANGE</td>
|
|
32
|
+
# <td>Failure happened in foreign exchange (FX).</td>
|
|
33
|
+
# </tr>
|
|
34
|
+
# <tr>
|
|
35
|
+
# <td>THREE_D_SECURE</td>
|
|
36
|
+
# <td>Failure happened during 3DSecure flow.</td>
|
|
37
|
+
# </tr>
|
|
38
|
+
# <tr>
|
|
39
|
+
# <td>FRAUD</td>
|
|
40
|
+
# <td>Failure happened in fraud checks.</td>
|
|
41
|
+
# </tr>
|
|
42
|
+
# </tbody>
|
|
43
|
+
# </table>
|
|
44
|
+
# @return [FailureModule]
|
|
45
|
+
attr_accessor :mmodule
|
|
46
|
+
|
|
47
|
+
# Category of transaction failure.
|
|
48
|
+
# <table>
|
|
49
|
+
# <thead>
|
|
50
|
+
# <tr>
|
|
51
|
+
# <th>Category</th>
|
|
52
|
+
# <th>Description</th>
|
|
53
|
+
# </tr>
|
|
54
|
+
# </thead>
|
|
55
|
+
# <tbody>
|
|
56
|
+
# <tr>
|
|
57
|
+
# <td>USER_ERROR</td>
|
|
58
|
+
# <td>The buyer has entered invalid details during the payment
|
|
59
|
+
# session.</td>
|
|
60
|
+
# </tr>
|
|
61
|
+
# <tr>
|
|
62
|
+
# <td>INTEGRATION_ERROR</td>
|
|
63
|
+
# <td>There is an error with the integration between us and an
|
|
64
|
+
# external system for this request. Example - provider does not support
|
|
65
|
+
# decimal. Or MID does not exist.</td>
|
|
66
|
+
# </tr>
|
|
67
|
+
# <tr>
|
|
68
|
+
# <td>SECURITY_ERROR</td>
|
|
69
|
+
# <td>
|
|
70
|
+
# Payment failed to pass additional security screening verification.
|
|
71
|
+
# EXAMPLES:
|
|
72
|
+
# - CARD_BLOCKED
|
|
73
|
+
# - AVS_FAILED
|
|
74
|
+
# - FRAUD_SUSPICION
|
|
75
|
+
# - 3DS_FAILED
|
|
76
|
+
# </td>
|
|
77
|
+
# </tr>
|
|
78
|
+
# <tr>
|
|
79
|
+
# <td>TECHNICAL_ERROR</td>
|
|
80
|
+
# <td>Transient errors that are happening due to unavailable of some
|
|
81
|
+
# system (possibly downstream).</td>
|
|
82
|
+
# </tr>
|
|
83
|
+
# <tr>
|
|
84
|
+
# <td>TRANSACTION_ERROR</td>
|
|
85
|
+
# <td>Transaction related errors.</td>
|
|
86
|
+
# </tr>
|
|
87
|
+
# </tbody>
|
|
88
|
+
# </table>
|
|
89
|
+
# @return [FailureCategory]
|
|
90
|
+
attr_accessor :category
|
|
91
|
+
|
|
92
|
+
# Exact reason for the failure.
|
|
93
|
+
# Examples:
|
|
94
|
+
# - INVALID_CARD_NUMBER
|
|
95
|
+
# - CARD_BLOCKED
|
|
96
|
+
# - AVS_FAILED
|
|
97
|
+
# - FRAUD_SUSPICION
|
|
98
|
+
# - 3DS_FAILED
|
|
99
|
+
# - INVALID_MID
|
|
100
|
+
# - CONNECTION_TIMEOUT
|
|
101
|
+
# @return [String]
|
|
102
|
+
attr_accessor :reason
|
|
103
|
+
|
|
104
|
+
# Human readable reason for the failure.
|
|
105
|
+
# @return [String]
|
|
106
|
+
attr_accessor :description
|
|
107
|
+
|
|
108
|
+
# Amount that was attempted.
|
|
109
|
+
# @return [NonNegativeAmount]
|
|
110
|
+
attr_accessor :attempted_amount
|
|
111
|
+
|
|
112
|
+
# A mapping from model property names to API property names.
|
|
113
|
+
def self.names
|
|
114
|
+
@_hash = {} if @_hash.nil?
|
|
115
|
+
@_hash['mmodule'] = 'module'
|
|
116
|
+
@_hash['category'] = 'category'
|
|
117
|
+
@_hash['reason'] = 'reason'
|
|
118
|
+
@_hash['description'] = 'description'
|
|
119
|
+
@_hash['attempted_amount'] = 'attemptedAmount'
|
|
120
|
+
@_hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# An array for optional fields
|
|
124
|
+
def self.optionals
|
|
125
|
+
%w[
|
|
126
|
+
attempted_amount
|
|
127
|
+
]
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# An array for nullable fields
|
|
131
|
+
def self.nullables
|
|
132
|
+
[]
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def initialize(mmodule:, category:, reason:, description:,
|
|
136
|
+
attempted_amount: SKIP, additional_properties: nil)
|
|
137
|
+
# Add additional model properties to the instance
|
|
138
|
+
additional_properties = {} if additional_properties.nil?
|
|
139
|
+
|
|
140
|
+
@mmodule = mmodule
|
|
141
|
+
@category = category
|
|
142
|
+
@reason = reason
|
|
143
|
+
@description = description
|
|
144
|
+
@attempted_amount = attempted_amount unless attempted_amount == SKIP
|
|
145
|
+
@additional_properties = additional_properties
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Creates an instance of the object from a hash.
|
|
149
|
+
def self.from_hash(hash)
|
|
150
|
+
return nil unless hash
|
|
151
|
+
|
|
152
|
+
# Extract variables from the hash.
|
|
153
|
+
mmodule = hash.key?('module') ? hash['module'] : nil
|
|
154
|
+
category = hash.key?('category') ? hash['category'] : nil
|
|
155
|
+
reason = hash.key?('reason') ? hash['reason'] : nil
|
|
156
|
+
description = hash.key?('description') ? hash['description'] : nil
|
|
157
|
+
attempted_amount = NonNegativeAmount.from_hash(hash['attemptedAmount']) if
|
|
158
|
+
hash['attemptedAmount']
|
|
159
|
+
|
|
160
|
+
# Create a new hash for additional properties, removing known properties.
|
|
161
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
162
|
+
|
|
163
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
164
|
+
new_hash, proc { |value| value }
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
# Create object from extracted values.
|
|
168
|
+
TransactionFailure.new(mmodule: mmodule,
|
|
169
|
+
category: category,
|
|
170
|
+
reason: reason,
|
|
171
|
+
description: description,
|
|
172
|
+
attempted_amount: attempted_amount,
|
|
173
|
+
additional_properties: additional_properties)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Validates an instance of the object from a given value.
|
|
177
|
+
# @param [TransactionFailure | Hash] The value against the validation is performed.
|
|
178
|
+
def self.validate(value)
|
|
179
|
+
if value.instance_of? self
|
|
180
|
+
return (
|
|
181
|
+
APIHelper.valid_type?(value.mmodule,
|
|
182
|
+
->(val) { FailureModule.validate(val) }) and
|
|
183
|
+
APIHelper.valid_type?(value.category,
|
|
184
|
+
->(val) { FailureCategory.validate(val) }) and
|
|
185
|
+
APIHelper.valid_type?(value.reason,
|
|
186
|
+
->(val) { val.instance_of? String }) and
|
|
187
|
+
APIHelper.valid_type?(value.description,
|
|
188
|
+
->(val) { val.instance_of? String })
|
|
189
|
+
)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
return false unless value.instance_of? Hash
|
|
193
|
+
|
|
194
|
+
(
|
|
195
|
+
APIHelper.valid_type?(value['module'],
|
|
196
|
+
->(val) { FailureModule.validate(val) }) and
|
|
197
|
+
APIHelper.valid_type?(value['category'],
|
|
198
|
+
->(val) { FailureCategory.validate(val) }) and
|
|
199
|
+
APIHelper.valid_type?(value['reason'],
|
|
200
|
+
->(val) { val.instance_of? String }) and
|
|
201
|
+
APIHelper.valid_type?(value['description'],
|
|
202
|
+
->(val) { val.instance_of? String })
|
|
203
|
+
)
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Provides a human-readable string representation of the object.
|
|
207
|
+
def to_s
|
|
208
|
+
class_name = self.class.name.split('::').last
|
|
209
|
+
"<#{class_name} mmodule: #{@mmodule}, category: #{@category}, reason: #{@reason},"\
|
|
210
|
+
" description: #{@description}, attempted_amount: #{@attempted_amount},"\
|
|
211
|
+
" additional_properties: #{@additional_properties}>"
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
215
|
+
def inspect
|
|
216
|
+
class_name = self.class.name.split('::').last
|
|
217
|
+
"<#{class_name} mmodule: #{@mmodule.inspect}, category: #{@category.inspect}, reason:"\
|
|
218
|
+
" #{@reason.inspect}, description: #{@description.inspect}, attempted_amount:"\
|
|
219
|
+
" #{@attempted_amount.inspect}, additional_properties: #{@additional_properties}>"
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# cell_point_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module CellPointApi
|
|
7
|
+
# Traveling from an origin to a destination. May have multiple Travel Legs as
|
|
8
|
+
# part of a journey to get to the final destination. Note that during a
|
|
9
|
+
# One-Way itinerary, there will be exactly 1 journey. On a Round-Trip
|
|
10
|
+
# itinerary, there will be exactly 2 journeys. Multi-City may have between 2+
|
|
11
|
+
# journeys.
|
|
12
|
+
class TravelJourney < BaseModel
|
|
13
|
+
SKIP = Object.new
|
|
14
|
+
private_constant :SKIP
|
|
15
|
+
|
|
16
|
+
# Segment of the journey.
|
|
17
|
+
# Given an the following `ItineraryType`, here are the example
|
|
18
|
+
# JourneySegment to use:
|
|
19
|
+
# <table>
|
|
20
|
+
# <thead>
|
|
21
|
+
# <tr>
|
|
22
|
+
# <th>Itinerary Type</th>
|
|
23
|
+
# <th>Journey Segment</th>
|
|
24
|
+
# <th>Description</th>
|
|
25
|
+
# </tr>
|
|
26
|
+
# </thead>
|
|
27
|
+
# <tbody>
|
|
28
|
+
# <tr>
|
|
29
|
+
# <td>ONE_WAY</td>
|
|
30
|
+
# <td>OUTBOUND</td>
|
|
31
|
+
# <td>Single Journey</td>
|
|
32
|
+
# </tr>
|
|
33
|
+
# <tr>
|
|
34
|
+
# <td>ROUND_TRIP</td>
|
|
35
|
+
# <td>OUTBOUND</td>
|
|
36
|
+
# <td>First Journey, leaving.</td>
|
|
37
|
+
# </tr>
|
|
38
|
+
# <tr>
|
|
39
|
+
# <td>ROUND_TRIP</td>
|
|
40
|
+
# <td>INBOUND</td>
|
|
41
|
+
# <td>Second Journey, returning.</td>
|
|
42
|
+
# </tr>
|
|
43
|
+
# <tr>
|
|
44
|
+
# <td>MULTI_CITY</td>
|
|
45
|
+
# <td>MULTI_CITY_1</td>
|
|
46
|
+
# <td>First Journey </td>
|
|
47
|
+
# </tr>
|
|
48
|
+
# <tr>
|
|
49
|
+
# <td>MULTI_CITY</td>
|
|
50
|
+
# <td>MULTI_CITY_2</td>
|
|
51
|
+
# <td>Second Journey </td>
|
|
52
|
+
# </tr>
|
|
53
|
+
# <tr>
|
|
54
|
+
# <td>MULTI_CITY</td>
|
|
55
|
+
# <td>MULTI_CITY_3</td>
|
|
56
|
+
# <td>Third Journey </td>
|
|
57
|
+
# </tr>
|
|
58
|
+
# </tbody>
|
|
59
|
+
# </table>
|
|
60
|
+
# @return [JourneySegment]
|
|
61
|
+
attr_accessor :journey_segment
|
|
62
|
+
|
|
63
|
+
# A collection of travel legs that make up the journey.
|
|
64
|
+
# @return [Array[TravelLeg]]
|
|
65
|
+
attr_accessor :legs
|
|
66
|
+
|
|
67
|
+
# A mapping from model property names to API property names.
|
|
68
|
+
def self.names
|
|
69
|
+
@_hash = {} if @_hash.nil?
|
|
70
|
+
@_hash['journey_segment'] = 'journeySegment'
|
|
71
|
+
@_hash['legs'] = 'legs'
|
|
72
|
+
@_hash
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# An array for optional fields
|
|
76
|
+
def self.optionals
|
|
77
|
+
[]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# An array for nullable fields
|
|
81
|
+
def self.nullables
|
|
82
|
+
[]
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def initialize(journey_segment:, legs:, additional_properties: nil)
|
|
86
|
+
# Add additional model properties to the instance
|
|
87
|
+
additional_properties = {} if additional_properties.nil?
|
|
88
|
+
|
|
89
|
+
@journey_segment = journey_segment
|
|
90
|
+
@legs = legs
|
|
91
|
+
@additional_properties = additional_properties
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Creates an instance of the object from a hash.
|
|
95
|
+
def self.from_hash(hash)
|
|
96
|
+
return nil unless hash
|
|
97
|
+
|
|
98
|
+
# Extract variables from the hash.
|
|
99
|
+
journey_segment =
|
|
100
|
+
hash.key?('journeySegment') ? hash['journeySegment'] : nil
|
|
101
|
+
# Parameter is an array, so we need to iterate through it
|
|
102
|
+
legs = nil
|
|
103
|
+
unless hash['legs'].nil?
|
|
104
|
+
legs = []
|
|
105
|
+
hash['legs'].each do |structure|
|
|
106
|
+
legs << (TravelLeg.from_hash(structure) if structure)
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
legs = nil unless hash.key?('legs')
|
|
111
|
+
|
|
112
|
+
# Create a new hash for additional properties, removing known properties.
|
|
113
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
114
|
+
|
|
115
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
116
|
+
new_hash, proc { |value| value }
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
# Create object from extracted values.
|
|
120
|
+
TravelJourney.new(journey_segment: journey_segment,
|
|
121
|
+
legs: legs,
|
|
122
|
+
additional_properties: additional_properties)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Provides a human-readable string representation of the object.
|
|
126
|
+
def to_s
|
|
127
|
+
class_name = self.class.name.split('::').last
|
|
128
|
+
"<#{class_name} journey_segment: #{@journey_segment}, legs: #{@legs},"\
|
|
129
|
+
" additional_properties: #{@additional_properties}>"
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
133
|
+
def inspect
|
|
134
|
+
class_name = self.class.name.split('::').last
|
|
135
|
+
"<#{class_name} journey_segment: #{@journey_segment.inspect}, legs: #{@legs.inspect},"\
|
|
136
|
+
" additional_properties: #{@additional_properties}>"
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# cell_point_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module CellPointApi
|
|
8
|
+
# Leg in the journey.
|
|
9
|
+
class TravelLeg < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Identifier for leg that is unique within this order.
|
|
14
|
+
# This identifier should be used for any reference to this travel leg
|
|
15
|
+
# elsewhere,
|
|
16
|
+
# such as linking this specific leg to an ancillary in the price summary.
|
|
17
|
+
# How this identifier is generated is up to the merchant, as long as it is
|
|
18
|
+
# unique within the order.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# The travel airport details.
|
|
23
|
+
# @return [Airport]
|
|
24
|
+
attr_accessor :origin
|
|
25
|
+
|
|
26
|
+
# The travel airport details.
|
|
27
|
+
# @return [Airport]
|
|
28
|
+
attr_accessor :destination
|
|
29
|
+
|
|
30
|
+
# The date and time of departure.
|
|
31
|
+
# @return [DateTime]
|
|
32
|
+
attr_accessor :departure_time
|
|
33
|
+
|
|
34
|
+
# The date and time of arrival.
|
|
35
|
+
# @return [DateTime]
|
|
36
|
+
attr_accessor :arrival_time
|
|
37
|
+
|
|
38
|
+
# IATA code for the class of service for this leg of the trip, such as coach
|
|
39
|
+
# or first class.
|
|
40
|
+
# @return [String]
|
|
41
|
+
attr_accessor :booking_class_code
|
|
42
|
+
|
|
43
|
+
# Service level purchased, i.e. Economy, Business, First.
|
|
44
|
+
# @return [String]
|
|
45
|
+
attr_accessor :service_level
|
|
46
|
+
|
|
47
|
+
# Carrier of this flight.
|
|
48
|
+
# > In case of codeshare, this is the marketing flight number.
|
|
49
|
+
# @return [Carrier]
|
|
50
|
+
attr_accessor :carrier
|
|
51
|
+
|
|
52
|
+
# Number assigned to this individual flight.
|
|
53
|
+
# > In case of codeshare, this is the marketing flight number.
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :flight_number
|
|
56
|
+
|
|
57
|
+
# Information about codesharing agreement for this flight.
|
|
58
|
+
# @return [Codeshare]
|
|
59
|
+
attr_accessor :codeshare
|
|
60
|
+
|
|
61
|
+
# Information about codesharing agreement for this flight.
|
|
62
|
+
# @return [TrueClass | FalseClass]
|
|
63
|
+
attr_accessor :stop_over_allowed
|
|
64
|
+
|
|
65
|
+
# A mapping from model property names to API property names.
|
|
66
|
+
def self.names
|
|
67
|
+
@_hash = {} if @_hash.nil?
|
|
68
|
+
@_hash['id'] = 'id'
|
|
69
|
+
@_hash['origin'] = 'origin'
|
|
70
|
+
@_hash['destination'] = 'destination'
|
|
71
|
+
@_hash['departure_time'] = 'departureTime'
|
|
72
|
+
@_hash['arrival_time'] = 'arrivalTime'
|
|
73
|
+
@_hash['booking_class_code'] = 'bookingClassCode'
|
|
74
|
+
@_hash['service_level'] = 'serviceLevel'
|
|
75
|
+
@_hash['carrier'] = 'carrier'
|
|
76
|
+
@_hash['flight_number'] = 'flightNumber'
|
|
77
|
+
@_hash['codeshare'] = 'codeshare'
|
|
78
|
+
@_hash['stop_over_allowed'] = 'stopOverAllowed'
|
|
79
|
+
@_hash
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# An array for optional fields
|
|
83
|
+
def self.optionals
|
|
84
|
+
%w[
|
|
85
|
+
booking_class_code
|
|
86
|
+
service_level
|
|
87
|
+
carrier
|
|
88
|
+
flight_number
|
|
89
|
+
codeshare
|
|
90
|
+
stop_over_allowed
|
|
91
|
+
]
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# An array for nullable fields
|
|
95
|
+
def self.nullables
|
|
96
|
+
[]
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def initialize(id:, origin:, destination:, departure_time:, arrival_time:,
|
|
100
|
+
booking_class_code: SKIP, service_level: SKIP, carrier: SKIP,
|
|
101
|
+
flight_number: SKIP, codeshare: SKIP,
|
|
102
|
+
stop_over_allowed: SKIP, additional_properties: nil)
|
|
103
|
+
# Add additional model properties to the instance
|
|
104
|
+
additional_properties = {} if additional_properties.nil?
|
|
105
|
+
|
|
106
|
+
@id = id
|
|
107
|
+
@origin = origin
|
|
108
|
+
@destination = destination
|
|
109
|
+
@departure_time = departure_time
|
|
110
|
+
@arrival_time = arrival_time
|
|
111
|
+
@booking_class_code = booking_class_code unless booking_class_code == SKIP
|
|
112
|
+
@service_level = service_level unless service_level == SKIP
|
|
113
|
+
@carrier = carrier unless carrier == SKIP
|
|
114
|
+
@flight_number = flight_number unless flight_number == SKIP
|
|
115
|
+
@codeshare = codeshare unless codeshare == SKIP
|
|
116
|
+
@stop_over_allowed = stop_over_allowed unless stop_over_allowed == SKIP
|
|
117
|
+
@additional_properties = additional_properties
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Creates an instance of the object from a hash.
|
|
121
|
+
def self.from_hash(hash)
|
|
122
|
+
return nil unless hash
|
|
123
|
+
|
|
124
|
+
# Extract variables from the hash.
|
|
125
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
126
|
+
origin = Airport.from_hash(hash['origin']) if hash['origin']
|
|
127
|
+
destination = Airport.from_hash(hash['destination']) if hash['destination']
|
|
128
|
+
departure_time = if hash.key?('departureTime')
|
|
129
|
+
(DateTimeHelper.from_rfc3339(hash['departureTime']) if hash['departureTime'])
|
|
130
|
+
end
|
|
131
|
+
arrival_time = if hash.key?('arrivalTime')
|
|
132
|
+
(DateTimeHelper.from_rfc3339(hash['arrivalTime']) if hash['arrivalTime'])
|
|
133
|
+
end
|
|
134
|
+
booking_class_code =
|
|
135
|
+
hash.key?('bookingClassCode') ? hash['bookingClassCode'] : SKIP
|
|
136
|
+
service_level = hash.key?('serviceLevel') ? hash['serviceLevel'] : SKIP
|
|
137
|
+
carrier = Carrier.from_hash(hash['carrier']) if hash['carrier']
|
|
138
|
+
flight_number = hash.key?('flightNumber') ? hash['flightNumber'] : SKIP
|
|
139
|
+
codeshare = Codeshare.from_hash(hash['codeshare']) if hash['codeshare']
|
|
140
|
+
stop_over_allowed =
|
|
141
|
+
hash.key?('stopOverAllowed') ? hash['stopOverAllowed'] : SKIP
|
|
142
|
+
|
|
143
|
+
# Create a new hash for additional properties, removing known properties.
|
|
144
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
145
|
+
|
|
146
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
147
|
+
new_hash, proc { |value| value }
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
# Create object from extracted values.
|
|
151
|
+
TravelLeg.new(id: id,
|
|
152
|
+
origin: origin,
|
|
153
|
+
destination: destination,
|
|
154
|
+
departure_time: departure_time,
|
|
155
|
+
arrival_time: arrival_time,
|
|
156
|
+
booking_class_code: booking_class_code,
|
|
157
|
+
service_level: service_level,
|
|
158
|
+
carrier: carrier,
|
|
159
|
+
flight_number: flight_number,
|
|
160
|
+
codeshare: codeshare,
|
|
161
|
+
stop_over_allowed: stop_over_allowed,
|
|
162
|
+
additional_properties: additional_properties)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
def to_custom_departure_time
|
|
166
|
+
DateTimeHelper.to_rfc3339(departure_time)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def to_custom_arrival_time
|
|
170
|
+
DateTimeHelper.to_rfc3339(arrival_time)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Provides a human-readable string representation of the object.
|
|
174
|
+
def to_s
|
|
175
|
+
class_name = self.class.name.split('::').last
|
|
176
|
+
"<#{class_name} id: #{@id}, origin: #{@origin}, destination: #{@destination},"\
|
|
177
|
+
" departure_time: #{@departure_time}, arrival_time: #{@arrival_time}, booking_class_code:"\
|
|
178
|
+
" #{@booking_class_code}, service_level: #{@service_level}, carrier: #{@carrier},"\
|
|
179
|
+
" flight_number: #{@flight_number}, codeshare: #{@codeshare}, stop_over_allowed:"\
|
|
180
|
+
" #{@stop_over_allowed}, additional_properties: #{@additional_properties}>"
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
184
|
+
def inspect
|
|
185
|
+
class_name = self.class.name.split('::').last
|
|
186
|
+
"<#{class_name} id: #{@id.inspect}, origin: #{@origin.inspect}, destination:"\
|
|
187
|
+
" #{@destination.inspect}, departure_time: #{@departure_time.inspect}, arrival_time:"\
|
|
188
|
+
" #{@arrival_time.inspect}, booking_class_code: #{@booking_class_code.inspect},"\
|
|
189
|
+
" service_level: #{@service_level.inspect}, carrier: #{@carrier.inspect}, flight_number:"\
|
|
190
|
+
" #{@flight_number.inspect}, codeshare: #{@codeshare.inspect}, stop_over_allowed:"\
|
|
191
|
+
" #{@stop_over_allowed.inspect}, additional_properties: #{@additional_properties}>"
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# cell_point_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module CellPointApi
|
|
7
|
+
# Request object for triggering bulk payments.
|
|
8
|
+
class TriggerBulkRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# List of actions to be performed in bulk.
|
|
13
|
+
# @return [Array[TransactionAction]]
|
|
14
|
+
attr_accessor :bulk_actions
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['bulk_actions'] = 'bulkActions'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
[]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for nullable fields
|
|
29
|
+
def self.nullables
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def initialize(bulk_actions:, additional_properties: nil)
|
|
34
|
+
# Add additional model properties to the instance
|
|
35
|
+
additional_properties = {} if additional_properties.nil?
|
|
36
|
+
|
|
37
|
+
@bulk_actions = bulk_actions
|
|
38
|
+
@additional_properties = additional_properties
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Creates an instance of the object from a hash.
|
|
42
|
+
def self.from_hash(hash)
|
|
43
|
+
return nil unless hash
|
|
44
|
+
|
|
45
|
+
# Extract variables from the hash.
|
|
46
|
+
# Parameter is an array, so we need to iterate through it
|
|
47
|
+
bulk_actions = nil
|
|
48
|
+
unless hash['bulkActions'].nil?
|
|
49
|
+
bulk_actions = []
|
|
50
|
+
hash['bulkActions'].each do |structure|
|
|
51
|
+
bulk_actions << (TransactionAction.from_hash(structure) if structure)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
bulk_actions = nil unless hash.key?('bulkActions')
|
|
56
|
+
|
|
57
|
+
# Create a new hash for additional properties, removing known properties.
|
|
58
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
59
|
+
|
|
60
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
61
|
+
new_hash, proc { |value| value }
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
# Create object from extracted values.
|
|
65
|
+
TriggerBulkRequest.new(bulk_actions: bulk_actions,
|
|
66
|
+
additional_properties: additional_properties)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Provides a human-readable string representation of the object.
|
|
70
|
+
def to_s
|
|
71
|
+
class_name = self.class.name.split('::').last
|
|
72
|
+
"<#{class_name} bulk_actions: #{@bulk_actions}, additional_properties:"\
|
|
73
|
+
" #{@additional_properties}>"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
77
|
+
def inspect
|
|
78
|
+
class_name = self.class.name.split('::').last
|
|
79
|
+
"<#{class_name} bulk_actions: #{@bulk_actions.inspect}, additional_properties:"\
|
|
80
|
+
" #{@additional_properties}>"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|