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,366 @@
|
|
|
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
|
+
# Airline Ancillary details and codes.
|
|
8
|
+
class AncillaryDetails < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Ancillary subcode defined by IATA.
|
|
13
|
+
# Example:
|
|
14
|
+
# <table>
|
|
15
|
+
# <tr>
|
|
16
|
+
# <th>Sub Code</th>
|
|
17
|
+
# <th>Group</th>
|
|
18
|
+
# <th>Sub Group</th>
|
|
19
|
+
# <th>Description 1</th>
|
|
20
|
+
# <th>Description 2</th>
|
|
21
|
+
# <th>Commercial Name</th>
|
|
22
|
+
# <th>RFIC</th>
|
|
23
|
+
# </tr>
|
|
24
|
+
# <tr>
|
|
25
|
+
# <td>0MJ</td>
|
|
26
|
+
# <td>BG - Baggage</td>
|
|
27
|
+
# <td>CY - Carry On Hand Baggage</td>
|
|
28
|
+
# <td>10 - Up to 22 lb/10kg</td>
|
|
29
|
+
# <td>4U - Up to 45 li/115 lcm</td>
|
|
30
|
+
# <td>CARRY 10KG 22LB UPTO 45LI 115LCM C</td>
|
|
31
|
+
# <td>C</td>
|
|
32
|
+
# </tr>
|
|
33
|
+
# </table>
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :subcode
|
|
36
|
+
|
|
37
|
+
# <table>
|
|
38
|
+
# <tr>
|
|
39
|
+
# <th>Group</th>
|
|
40
|
+
# <th>Description</th>
|
|
41
|
+
# </tr>
|
|
42
|
+
# <tr>
|
|
43
|
+
# <td>BD</td>
|
|
44
|
+
# <td>Bundled Service</td>
|
|
45
|
+
# </tr>
|
|
46
|
+
# <tr>
|
|
47
|
+
# <td>BF</td>
|
|
48
|
+
# <td>Branded Fares</td>
|
|
49
|
+
# </tr>
|
|
50
|
+
# <tr>
|
|
51
|
+
# <td>BG</td>
|
|
52
|
+
# <td>Baggage</td>
|
|
53
|
+
# </tr>
|
|
54
|
+
# <tr>
|
|
55
|
+
# <td>CO</td>
|
|
56
|
+
# <td>Carbon Offset</td>
|
|
57
|
+
# </tr>
|
|
58
|
+
# <tr>
|
|
59
|
+
# <td>FF</td>
|
|
60
|
+
# <td>Frequent Flyer</td>
|
|
61
|
+
# </tr>
|
|
62
|
+
# <tr>
|
|
63
|
+
# <td>GT</td>
|
|
64
|
+
# <td>Ground Transportation and Non Air Services</td>
|
|
65
|
+
# </tr>
|
|
66
|
+
# <tr>
|
|
67
|
+
# <td>IE</td>
|
|
68
|
+
# <td>In-flight entertainment</td>
|
|
69
|
+
# </tr>
|
|
70
|
+
# <tr>
|
|
71
|
+
# <td>LG</td>
|
|
72
|
+
# <td>Lounge</td>
|
|
73
|
+
# </tr>
|
|
74
|
+
# <tr>
|
|
75
|
+
# <td>MD</td>
|
|
76
|
+
# <td>Medical</td>
|
|
77
|
+
# </tr>
|
|
78
|
+
# <tr>
|
|
79
|
+
# <td>ML</td>
|
|
80
|
+
# <td>Meal/Beverage</td>
|
|
81
|
+
# </tr>
|
|
82
|
+
# <tr>
|
|
83
|
+
# <td>PT</td>
|
|
84
|
+
# <td>Pets</td>
|
|
85
|
+
# </tr>
|
|
86
|
+
# <tr>
|
|
87
|
+
# <td>RO</td>
|
|
88
|
+
# <td>Rule Override *</td>
|
|
89
|
+
# </tr>
|
|
90
|
+
# <tr>
|
|
91
|
+
# <td>SA</td>
|
|
92
|
+
# <td>Pre-reserved Seat Assignment</td>
|
|
93
|
+
# </tr>
|
|
94
|
+
# <tr>
|
|
95
|
+
# <td>SB</td>
|
|
96
|
+
# <td>Standby</td>
|
|
97
|
+
# </tr>
|
|
98
|
+
# <tr>
|
|
99
|
+
# <td>ST</td>
|
|
100
|
+
# <td>Store</td>
|
|
101
|
+
# </tr>
|
|
102
|
+
# <tr>
|
|
103
|
+
# <td>TS</td>
|
|
104
|
+
# <td>Travel Services</td>
|
|
105
|
+
# </tr>
|
|
106
|
+
# <tr>
|
|
107
|
+
# <td>UN</td>
|
|
108
|
+
# <td>Unaccompanied Travel (Escort)</td>
|
|
109
|
+
# </tr>
|
|
110
|
+
# <tr>
|
|
111
|
+
# <td>UP</td>
|
|
112
|
+
# <td>Upgrades</td>
|
|
113
|
+
# </tr>
|
|
114
|
+
# <tr>
|
|
115
|
+
# <td>UU</td>
|
|
116
|
+
# <td>Unaccompanied Travel (Unescorted)</td>
|
|
117
|
+
# </tr>
|
|
118
|
+
# </table>
|
|
119
|
+
# @return [String]
|
|
120
|
+
attr_accessor :group
|
|
121
|
+
|
|
122
|
+
# <table>
|
|
123
|
+
# <tr>
|
|
124
|
+
# <th>Group</th>
|
|
125
|
+
# <th>Description</th>
|
|
126
|
+
# </tr>
|
|
127
|
+
# <tr>
|
|
128
|
+
# <td>BD</td>
|
|
129
|
+
# <td>Bundled Service</td>
|
|
130
|
+
# </tr>
|
|
131
|
+
# <tr>
|
|
132
|
+
# <td>BF</td>
|
|
133
|
+
# <td>Branded Fares</td>
|
|
134
|
+
# </tr>
|
|
135
|
+
# <tr>
|
|
136
|
+
# <td>BG</td>
|
|
137
|
+
# <td>Baggage</td>
|
|
138
|
+
# </tr>
|
|
139
|
+
# <tr>
|
|
140
|
+
# <td>CO</td>
|
|
141
|
+
# <td>Carbon Offset</td>
|
|
142
|
+
# </tr>
|
|
143
|
+
# <tr>
|
|
144
|
+
# <td>FF</td>
|
|
145
|
+
# <td>Frequent Flyer</td>
|
|
146
|
+
# </tr>
|
|
147
|
+
# <tr>
|
|
148
|
+
# <td>GT</td>
|
|
149
|
+
# <td>Ground Transportation and Non Air Services</td>
|
|
150
|
+
# </tr>
|
|
151
|
+
# <tr>
|
|
152
|
+
# <td>IE</td>
|
|
153
|
+
# <td>In-flight entertainment</td>
|
|
154
|
+
# </tr>
|
|
155
|
+
# <tr>
|
|
156
|
+
# <td>LG</td>
|
|
157
|
+
# <td>Lounge</td>
|
|
158
|
+
# </tr>
|
|
159
|
+
# <tr>
|
|
160
|
+
# <td>MD</td>
|
|
161
|
+
# <td>Medical</td>
|
|
162
|
+
# </tr>
|
|
163
|
+
# <tr>
|
|
164
|
+
# <td>ML</td>
|
|
165
|
+
# <td>Meal/Beverage</td>
|
|
166
|
+
# </tr>
|
|
167
|
+
# <tr>
|
|
168
|
+
# <td>PT</td>
|
|
169
|
+
# <td>Pets</td>
|
|
170
|
+
# </tr>
|
|
171
|
+
# <tr>
|
|
172
|
+
# <td>RO</td>
|
|
173
|
+
# <td>Rule Override *</td>
|
|
174
|
+
# </tr>
|
|
175
|
+
# <tr>
|
|
176
|
+
# <td>SA</td>
|
|
177
|
+
# <td>Pre-reserved Seat Assignment</td>
|
|
178
|
+
# </tr>
|
|
179
|
+
# <tr>
|
|
180
|
+
# <td>SB</td>
|
|
181
|
+
# <td>Standby</td>
|
|
182
|
+
# </tr>
|
|
183
|
+
# <tr>
|
|
184
|
+
# <td>ST</td>
|
|
185
|
+
# <td>Store</td>
|
|
186
|
+
# </tr>
|
|
187
|
+
# <tr>
|
|
188
|
+
# <td>TS</td>
|
|
189
|
+
# <td>Travel Services</td>
|
|
190
|
+
# </tr>
|
|
191
|
+
# <tr>
|
|
192
|
+
# <td>UN</td>
|
|
193
|
+
# <td>Unaccompanied Travel (Escort)</td>
|
|
194
|
+
# </tr>
|
|
195
|
+
# <tr>
|
|
196
|
+
# <td>UP</td>
|
|
197
|
+
# <td>Upgrades</td>
|
|
198
|
+
# </tr>
|
|
199
|
+
# <tr>
|
|
200
|
+
# <td>UU</td>
|
|
201
|
+
# <td>Unaccompanied Travel (Unescorted)</td>
|
|
202
|
+
# </tr>
|
|
203
|
+
# </table>
|
|
204
|
+
# @return [String]
|
|
205
|
+
attr_accessor :subgroup
|
|
206
|
+
|
|
207
|
+
# <table>
|
|
208
|
+
# <thead>
|
|
209
|
+
# <tr>
|
|
210
|
+
# <th>RFIC</th>
|
|
211
|
+
# <th>Description</th>
|
|
212
|
+
# </tr>
|
|
213
|
+
# </thead>
|
|
214
|
+
# <tbody>
|
|
215
|
+
# <tr>
|
|
216
|
+
# <td>A</td>
|
|
217
|
+
# <td>Air Transportation</td>
|
|
218
|
+
# </tr>
|
|
219
|
+
# <tr>
|
|
220
|
+
# <td>B</td>
|
|
221
|
+
# <td>Surface Transportation /Non Air Services</td>
|
|
222
|
+
# </tr>
|
|
223
|
+
# <tr>
|
|
224
|
+
# <td>C</td>
|
|
225
|
+
# <td>Baggage</td>
|
|
226
|
+
# </tr>
|
|
227
|
+
# <tr>
|
|
228
|
+
# <td>D</td>
|
|
229
|
+
# <td>Financial Impact</td>
|
|
230
|
+
# </tr>
|
|
231
|
+
# <tr>
|
|
232
|
+
# <td>E</td>
|
|
233
|
+
# <td>Airport Services</td>
|
|
234
|
+
# </tr>
|
|
235
|
+
# <tr>
|
|
236
|
+
# <td>F</td>
|
|
237
|
+
# <td>Merchandise</td>
|
|
238
|
+
# </tr>
|
|
239
|
+
# <tr>
|
|
240
|
+
# <td>G</td>
|
|
241
|
+
# <td>In-flight Services</td>
|
|
242
|
+
# </tr>
|
|
243
|
+
# <tr>
|
|
244
|
+
# <td>H</td>
|
|
245
|
+
# <td>Reserved for future use</td>
|
|
246
|
+
# </tr>
|
|
247
|
+
# <tr>
|
|
248
|
+
# <td>I</td>
|
|
249
|
+
# <td>Individual Airline Use</td>
|
|
250
|
+
# </tr>
|
|
251
|
+
# </tbody>
|
|
252
|
+
# </table>
|
|
253
|
+
# @return [String]
|
|
254
|
+
attr_accessor :rfic_code
|
|
255
|
+
|
|
256
|
+
# Ancillary description codes defined by IATA.
|
|
257
|
+
# @return [Hash[String, String]]
|
|
258
|
+
attr_accessor :descriptions
|
|
259
|
+
|
|
260
|
+
# A mapping from model property names to API property names.
|
|
261
|
+
def self.names
|
|
262
|
+
@_hash = {} if @_hash.nil?
|
|
263
|
+
@_hash['subcode'] = 'subcode'
|
|
264
|
+
@_hash['group'] = 'group'
|
|
265
|
+
@_hash['subgroup'] = 'subgroup'
|
|
266
|
+
@_hash['rfic_code'] = 'rficCode'
|
|
267
|
+
@_hash['descriptions'] = 'descriptions'
|
|
268
|
+
@_hash
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# An array for optional fields
|
|
272
|
+
def self.optionals
|
|
273
|
+
%w[
|
|
274
|
+
rfic_code
|
|
275
|
+
descriptions
|
|
276
|
+
]
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# An array for nullable fields
|
|
280
|
+
def self.nullables
|
|
281
|
+
[]
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
def initialize(subcode:, group:, subgroup:, rfic_code: SKIP,
|
|
285
|
+
descriptions: SKIP, additional_properties: nil)
|
|
286
|
+
# Add additional model properties to the instance
|
|
287
|
+
additional_properties = {} if additional_properties.nil?
|
|
288
|
+
|
|
289
|
+
@subcode = subcode
|
|
290
|
+
@group = group
|
|
291
|
+
@subgroup = subgroup
|
|
292
|
+
@rfic_code = rfic_code unless rfic_code == SKIP
|
|
293
|
+
@descriptions = descriptions unless descriptions == SKIP
|
|
294
|
+
@additional_properties = additional_properties
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Creates an instance of the object from a hash.
|
|
298
|
+
def self.from_hash(hash)
|
|
299
|
+
return nil unless hash
|
|
300
|
+
|
|
301
|
+
# Extract variables from the hash.
|
|
302
|
+
subcode = hash.key?('subcode') ? hash['subcode'] : nil
|
|
303
|
+
group = hash.key?('group') ? hash['group'] : nil
|
|
304
|
+
subgroup = hash.key?('subgroup') ? hash['subgroup'] : nil
|
|
305
|
+
rfic_code = hash.key?('rficCode') ? hash['rficCode'] : SKIP
|
|
306
|
+
descriptions = hash.key?('descriptions') ? hash['descriptions'] : SKIP
|
|
307
|
+
|
|
308
|
+
# Create a new hash for additional properties, removing known properties.
|
|
309
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
310
|
+
|
|
311
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
312
|
+
new_hash, proc { |value| value }
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
# Create object from extracted values.
|
|
316
|
+
AncillaryDetails.new(subcode: subcode,
|
|
317
|
+
group: group,
|
|
318
|
+
subgroup: subgroup,
|
|
319
|
+
rfic_code: rfic_code,
|
|
320
|
+
descriptions: descriptions,
|
|
321
|
+
additional_properties: additional_properties)
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Validates an instance of the object from a given value.
|
|
325
|
+
# @param [AncillaryDetails | Hash] The value against the validation is performed.
|
|
326
|
+
def self.validate(value)
|
|
327
|
+
if value.instance_of? self
|
|
328
|
+
return (
|
|
329
|
+
APIHelper.valid_type?(value.subcode,
|
|
330
|
+
->(val) { val.instance_of? String }) and
|
|
331
|
+
APIHelper.valid_type?(value.group,
|
|
332
|
+
->(val) { val.instance_of? String }) and
|
|
333
|
+
APIHelper.valid_type?(value.subgroup,
|
|
334
|
+
->(val) { val.instance_of? String })
|
|
335
|
+
)
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
return false unless value.instance_of? Hash
|
|
339
|
+
|
|
340
|
+
(
|
|
341
|
+
APIHelper.valid_type?(value['subcode'],
|
|
342
|
+
->(val) { val.instance_of? String }) and
|
|
343
|
+
APIHelper.valid_type?(value['group'],
|
|
344
|
+
->(val) { val.instance_of? String }) and
|
|
345
|
+
APIHelper.valid_type?(value['subgroup'],
|
|
346
|
+
->(val) { val.instance_of? String })
|
|
347
|
+
)
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Provides a human-readable string representation of the object.
|
|
351
|
+
def to_s
|
|
352
|
+
class_name = self.class.name.split('::').last
|
|
353
|
+
"<#{class_name} subcode: #{@subcode}, group: #{@group}, subgroup: #{@subgroup}, rfic_code:"\
|
|
354
|
+
" #{@rfic_code}, descriptions: #{@descriptions}, additional_properties:"\
|
|
355
|
+
" #{@additional_properties}>"
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
359
|
+
def inspect
|
|
360
|
+
class_name = self.class.name.split('::').last
|
|
361
|
+
"<#{class_name} subcode: #{@subcode.inspect}, group: #{@group.inspect}, subgroup:"\
|
|
362
|
+
" #{@subgroup.inspect}, rfic_code: #{@rfic_code.inspect}, descriptions:"\
|
|
363
|
+
" #{@descriptions.inspect}, additional_properties: #{@additional_properties}>"
|
|
364
|
+
end
|
|
365
|
+
end
|
|
366
|
+
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
|
+
# Configuration for Apple Pay.
|
|
8
|
+
class ApplePayConfig < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Merchant identifier to be used for the payment
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :merchant_id
|
|
15
|
+
|
|
16
|
+
# Card Schemes(without configuration) supported for payment
|
|
17
|
+
# @return [Array[CardScheme]]
|
|
18
|
+
attr_accessor :supported_schemes
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['merchant_id'] = 'merchantId'
|
|
24
|
+
@_hash['supported_schemes'] = 'supportedSchemes'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for nullable fields
|
|
34
|
+
def self.nullables
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def initialize(merchant_id:, supported_schemes:, additional_properties: nil)
|
|
39
|
+
# Add additional model properties to the instance
|
|
40
|
+
additional_properties = {} if additional_properties.nil?
|
|
41
|
+
|
|
42
|
+
@merchant_id = merchant_id
|
|
43
|
+
@supported_schemes = supported_schemes
|
|
44
|
+
@additional_properties = additional_properties
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Creates an instance of the object from a hash.
|
|
48
|
+
def self.from_hash(hash)
|
|
49
|
+
return nil unless hash
|
|
50
|
+
|
|
51
|
+
# Extract variables from the hash.
|
|
52
|
+
merchant_id = hash.key?('merchantId') ? hash['merchantId'] : nil
|
|
53
|
+
supported_schemes =
|
|
54
|
+
hash.key?('supportedSchemes') ? hash['supportedSchemes'] : nil
|
|
55
|
+
|
|
56
|
+
# Create a new hash for additional properties, removing known properties.
|
|
57
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
58
|
+
|
|
59
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
60
|
+
new_hash, proc { |value| value }
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
# Create object from extracted values.
|
|
64
|
+
ApplePayConfig.new(merchant_id: merchant_id,
|
|
65
|
+
supported_schemes: supported_schemes,
|
|
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} merchant_id: #{@merchant_id}, supported_schemes: #{@supported_schemes},"\
|
|
73
|
+
" additional_properties: #{@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} merchant_id: #{@merchant_id.inspect}, supported_schemes:"\
|
|
80
|
+
" #{@supported_schemes.inspect}, additional_properties: #{@additional_properties}>"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
# Apple Pay token that was used in the payment.
|
|
8
|
+
class ApplePayInstrumentApplePayNode < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Card token identifier. Used for both cards and Apple Pay.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :token
|
|
15
|
+
|
|
16
|
+
# Card Scheme networks connects acquiring banks to issuing banks so that a
|
|
17
|
+
# customer transaction can be verified.
|
|
18
|
+
# Is a middle man that also provide additional services, such as data
|
|
19
|
+
# processing, international transactions, etc.
|
|
20
|
+
# @return [CardScheme]
|
|
21
|
+
attr_accessor :scheme
|
|
22
|
+
|
|
23
|
+
# Display Payment Card Name.
|
|
24
|
+
# A string, suitable for display, that describes the card.
|
|
25
|
+
# For debit and credit cards, the display name often includes the card brand
|
|
26
|
+
# and the last four digits of the credit card number when available, for
|
|
27
|
+
# example: “************0492”, “Visa 1233”, “MasterCard 5678”, “AmEx 9876”.
|
|
28
|
+
# For Apple Pay Cash cards, the display name is “Apple Pay Cash”. However,
|
|
29
|
+
# there is no guarantee about the display name’s content or format.
|
|
30
|
+
# To protect the user’s privacy, Apple Pay sets the display name only after
|
|
31
|
+
# the user authorizes the purchase.
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :display_name
|
|
34
|
+
|
|
35
|
+
# A mapping from model property names to API property names.
|
|
36
|
+
def self.names
|
|
37
|
+
@_hash = {} if @_hash.nil?
|
|
38
|
+
@_hash['token'] = 'token'
|
|
39
|
+
@_hash['scheme'] = 'scheme'
|
|
40
|
+
@_hash['display_name'] = 'displayName'
|
|
41
|
+
@_hash
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# An array for optional fields
|
|
45
|
+
def self.optionals
|
|
46
|
+
%w[
|
|
47
|
+
scheme
|
|
48
|
+
display_name
|
|
49
|
+
]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# An array for nullable fields
|
|
53
|
+
def self.nullables
|
|
54
|
+
[]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def initialize(token:, scheme: SKIP, display_name: SKIP,
|
|
58
|
+
additional_properties: nil)
|
|
59
|
+
# Add additional model properties to the instance
|
|
60
|
+
additional_properties = {} if additional_properties.nil?
|
|
61
|
+
|
|
62
|
+
@token = token
|
|
63
|
+
@scheme = scheme unless scheme == SKIP
|
|
64
|
+
@display_name = display_name unless display_name == SKIP
|
|
65
|
+
@additional_properties = additional_properties
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Creates an instance of the object from a hash.
|
|
69
|
+
def self.from_hash(hash)
|
|
70
|
+
return nil unless hash
|
|
71
|
+
|
|
72
|
+
# Extract variables from the hash.
|
|
73
|
+
token = hash.key?('token') ? hash['token'] : nil
|
|
74
|
+
scheme = hash.key?('scheme') ? hash['scheme'] : SKIP
|
|
75
|
+
display_name = hash.key?('displayName') ? hash['displayName'] : SKIP
|
|
76
|
+
|
|
77
|
+
# Create a new hash for additional properties, removing known properties.
|
|
78
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
79
|
+
|
|
80
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
81
|
+
new_hash, proc { |value| value }
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Create object from extracted values.
|
|
85
|
+
ApplePayInstrumentApplePayNode.new(token: token,
|
|
86
|
+
scheme: scheme,
|
|
87
|
+
display_name: display_name,
|
|
88
|
+
additional_properties: additional_properties)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Validates an instance of the object from a given value.
|
|
92
|
+
# @param [ApplePayInstrumentApplePayNode | Hash] The value against the validation is performed.
|
|
93
|
+
def self.validate(value)
|
|
94
|
+
if value.instance_of? self
|
|
95
|
+
return APIHelper.valid_type?(value.token,
|
|
96
|
+
->(val) { val.instance_of? String })
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
return false unless value.instance_of? Hash
|
|
100
|
+
|
|
101
|
+
APIHelper.valid_type?(value['token'],
|
|
102
|
+
->(val) { val.instance_of? String })
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Provides a human-readable string representation of the object.
|
|
106
|
+
def to_s
|
|
107
|
+
class_name = self.class.name.split('::').last
|
|
108
|
+
"<#{class_name} token: #{@token}, scheme: #{@scheme}, display_name: #{@display_name},"\
|
|
109
|
+
" additional_properties: #{@additional_properties}>"
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
113
|
+
def inspect
|
|
114
|
+
class_name = self.class.name.split('::').last
|
|
115
|
+
"<#{class_name} token: #{@token.inspect}, scheme: #{@scheme.inspect}, display_name:"\
|
|
116
|
+
" #{@display_name.inspect}, additional_properties: #{@additional_properties}>"
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
@@ -0,0 +1,123 @@
|
|
|
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
|
+
# A payment instrument that is stored in the user's wallet.
|
|
8
|
+
class ApplePayPaymentInstrument < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Payment method type.
|
|
13
|
+
# @return [PaymentMethod]
|
|
14
|
+
attr_accessor :method
|
|
15
|
+
|
|
16
|
+
# Apple Pay token that was used in the payment.
|
|
17
|
+
# @return [ApplePayInstrumentApplePayNode]
|
|
18
|
+
attr_accessor :apple_pay_payment
|
|
19
|
+
|
|
20
|
+
# A mailing address.
|
|
21
|
+
# @return [PostalAddress]
|
|
22
|
+
attr_accessor :billing_address
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['method'] = 'method'
|
|
28
|
+
@_hash['apple_pay_payment'] = 'applePayPayment'
|
|
29
|
+
@_hash['billing_address'] = 'billingAddress'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for nullable fields
|
|
39
|
+
def self.nullables
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(method:, apple_pay_payment:, billing_address:,
|
|
44
|
+
additional_properties: nil)
|
|
45
|
+
# Add additional model properties to the instance
|
|
46
|
+
additional_properties = {} if additional_properties.nil?
|
|
47
|
+
|
|
48
|
+
@method = method
|
|
49
|
+
@apple_pay_payment = apple_pay_payment
|
|
50
|
+
@billing_address = billing_address
|
|
51
|
+
@additional_properties = additional_properties
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Creates an instance of the object from a hash.
|
|
55
|
+
def self.from_hash(hash)
|
|
56
|
+
return nil unless hash
|
|
57
|
+
|
|
58
|
+
# Extract variables from the hash.
|
|
59
|
+
method = hash.key?('method') ? hash['method'] : nil
|
|
60
|
+
apple_pay_payment = ApplePayInstrumentApplePayNode.from_hash(hash['applePayPayment']) if
|
|
61
|
+
hash['applePayPayment']
|
|
62
|
+
billing_address = PostalAddress.from_hash(hash['billingAddress']) if hash['billingAddress']
|
|
63
|
+
|
|
64
|
+
# Create a new hash for additional properties, removing known properties.
|
|
65
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
66
|
+
|
|
67
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
68
|
+
new_hash, proc { |value| value }
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Create object from extracted values.
|
|
72
|
+
ApplePayPaymentInstrument.new(method: method,
|
|
73
|
+
apple_pay_payment: apple_pay_payment,
|
|
74
|
+
billing_address: billing_address,
|
|
75
|
+
additional_properties: additional_properties)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Validates an instance of the object from a given value.
|
|
79
|
+
# @param [ApplePayPaymentInstrument | Hash] The value against the validation is performed.
|
|
80
|
+
def self.validate(value)
|
|
81
|
+
if value.instance_of? self
|
|
82
|
+
return (
|
|
83
|
+
APIHelper.valid_type?(value.method,
|
|
84
|
+
->(val) { PaymentMethod.validate(val) }) and
|
|
85
|
+
APIHelper.valid_type?(value.apple_pay_payment,
|
|
86
|
+
->(val) { ApplePayInstrumentApplePayNode.validate(val) },
|
|
87
|
+
is_model_hash: true) and
|
|
88
|
+
APIHelper.valid_type?(value.billing_address,
|
|
89
|
+
->(val) { PostalAddress.validate(val) },
|
|
90
|
+
is_model_hash: true)
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
return false unless value.instance_of? Hash
|
|
95
|
+
|
|
96
|
+
(
|
|
97
|
+
APIHelper.valid_type?(value['method'],
|
|
98
|
+
->(val) { PaymentMethod.validate(val) }) and
|
|
99
|
+
APIHelper.valid_type?(value['applePayPayment'],
|
|
100
|
+
->(val) { ApplePayInstrumentApplePayNode.validate(val) },
|
|
101
|
+
is_model_hash: true) and
|
|
102
|
+
APIHelper.valid_type?(value['billingAddress'],
|
|
103
|
+
->(val) { PostalAddress.validate(val) },
|
|
104
|
+
is_model_hash: true)
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Provides a human-readable string representation of the object.
|
|
109
|
+
def to_s
|
|
110
|
+
class_name = self.class.name.split('::').last
|
|
111
|
+
"<#{class_name} method: #{@method}, apple_pay_payment: #{@apple_pay_payment},"\
|
|
112
|
+
" billing_address: #{@billing_address}, additional_properties: #{@additional_properties}>"
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
116
|
+
def inspect
|
|
117
|
+
class_name = self.class.name.split('::').last
|
|
118
|
+
"<#{class_name} method: #{@method.inspect}, apple_pay_payment:"\
|
|
119
|
+
" #{@apple_pay_payment.inspect}, billing_address: #{@billing_address.inspect},"\
|
|
120
|
+
" additional_properties: #{@additional_properties}>"
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|