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,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
|
+
# Bundled line item base.
|
|
8
|
+
class BundledItemBase < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# What should be shown as the title of the line item on a receipt or billing
|
|
13
|
+
# summary.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :title
|
|
16
|
+
|
|
17
|
+
# The type of line item
|
|
18
|
+
# <table>
|
|
19
|
+
# <thead>
|
|
20
|
+
# <tr>
|
|
21
|
+
# <th>Line Item Type</th>
|
|
22
|
+
# <th>Description</th>
|
|
23
|
+
# </tr>
|
|
24
|
+
# </thead>
|
|
25
|
+
# <tbody>
|
|
26
|
+
# <tr>
|
|
27
|
+
# <td>ACTIVITY</td>
|
|
28
|
+
# <td>Activities, such as tours, museum tickets, etc.</td>
|
|
29
|
+
# </tr>
|
|
30
|
+
# <tr>
|
|
31
|
+
# <td>AIRLINE_ANCILLARY</td>
|
|
32
|
+
# <td>Ancillary services offered by airlines, such as baggage fees,
|
|
33
|
+
# seat upgrades, etc.</td>
|
|
34
|
+
# </tr>
|
|
35
|
+
# <tr>
|
|
36
|
+
# <td>AIRLINE_FARE</td>
|
|
37
|
+
# <td>Fares for a flight.</td>
|
|
38
|
+
# </tr>
|
|
39
|
+
# <tr>
|
|
40
|
+
# <td>AUTO_RENTAL</td>
|
|
41
|
+
# <td>Auto rental</td>
|
|
42
|
+
# </tr>
|
|
43
|
+
# <tr>
|
|
44
|
+
# <td>DISCOUNT</td>
|
|
45
|
+
# <td>Discount</td>
|
|
46
|
+
# </tr>
|
|
47
|
+
# <tr>
|
|
48
|
+
# <td>LODGING_RESERVATION</td>
|
|
49
|
+
# <td>Bookings of a room at a hotel, hostel, etc.</td>
|
|
50
|
+
# </tr>
|
|
51
|
+
# <tr>
|
|
52
|
+
# <td>PRODUCT</td>
|
|
53
|
+
# <td>Product is a catch-all for any other line item type not listed
|
|
54
|
+
# here.</td>
|
|
55
|
+
# </tr>
|
|
56
|
+
# </tbody>
|
|
57
|
+
# </table>
|
|
58
|
+
# @return [Type]
|
|
59
|
+
attr_accessor :type
|
|
60
|
+
|
|
61
|
+
# A mapping from model property names to API property names.
|
|
62
|
+
def self.names
|
|
63
|
+
@_hash = {} if @_hash.nil?
|
|
64
|
+
@_hash['title'] = 'title'
|
|
65
|
+
@_hash['type'] = 'type'
|
|
66
|
+
@_hash
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# An array for optional fields
|
|
70
|
+
def self.optionals
|
|
71
|
+
[]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# An array for nullable fields
|
|
75
|
+
def self.nullables
|
|
76
|
+
[]
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def initialize(title:, type:, additional_properties: nil)
|
|
80
|
+
# Add additional model properties to the instance
|
|
81
|
+
additional_properties = {} if additional_properties.nil?
|
|
82
|
+
|
|
83
|
+
@title = title
|
|
84
|
+
@type = type
|
|
85
|
+
@additional_properties = additional_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Creates an instance of the object from a hash.
|
|
89
|
+
def self.from_hash(hash)
|
|
90
|
+
return nil unless hash
|
|
91
|
+
|
|
92
|
+
# Extract variables from the hash.
|
|
93
|
+
title = hash.key?('title') ? hash['title'] : nil
|
|
94
|
+
type = hash.key?('type') ? hash['type'] : nil
|
|
95
|
+
|
|
96
|
+
# Create a new hash for additional properties, removing known properties.
|
|
97
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
98
|
+
|
|
99
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
100
|
+
new_hash, proc { |value| value }
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
# Create object from extracted values.
|
|
104
|
+
BundledItemBase.new(title: title,
|
|
105
|
+
type: type,
|
|
106
|
+
additional_properties: additional_properties)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Provides a human-readable string representation of the object.
|
|
110
|
+
def to_s
|
|
111
|
+
class_name = self.class.name.split('::').last
|
|
112
|
+
"<#{class_name} title: #{@title}, type: #{@type}, additional_properties:"\
|
|
113
|
+
" #{@additional_properties}>"
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
117
|
+
def inspect
|
|
118
|
+
class_name = self.class.name.split('::').last
|
|
119
|
+
"<#{class_name} title: #{@title.inspect}, type: #{@type.inspect}, additional_properties:"\
|
|
120
|
+
" #{@additional_properties}>"
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
@@ -0,0 +1,176 @@
|
|
|
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
|
+
# Represents a lodging reservation that is part of a bundle.
|
|
8
|
+
class BundledLodgingReservation < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Discriminator used to identify the type of line item.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_reader :type
|
|
15
|
+
|
|
16
|
+
# What should be shown as the title of the line item on a receipt or billing
|
|
17
|
+
# summary.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :title
|
|
20
|
+
|
|
21
|
+
# Stock Keeping Unit (SKU) is a product and service identification code for
|
|
22
|
+
# a specific product.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :sku
|
|
25
|
+
|
|
26
|
+
# Stock Keeping Unit (SKU) is a product and service identification code for
|
|
27
|
+
# a specific product.
|
|
28
|
+
# @return [Integer]
|
|
29
|
+
attr_accessor :quantity
|
|
30
|
+
|
|
31
|
+
# An amount that is a nonnegative number, i.e. {0, 1, 2, 3, 4, 5,…}
|
|
32
|
+
# @return [NonNegativeAmount]
|
|
33
|
+
attr_accessor :unit_price
|
|
34
|
+
|
|
35
|
+
# Total Price for the line item. Should be equal to `unitPrice` *
|
|
36
|
+
# `quantity`, if `unitPrice` is specified.
|
|
37
|
+
# @return [NonNegativeAmount]
|
|
38
|
+
attr_accessor :total_price
|
|
39
|
+
|
|
40
|
+
# Reference number for the booking.
|
|
41
|
+
# MUST match a bookingReference in `IndustryData.LodgingData`.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :booking_reference
|
|
44
|
+
|
|
45
|
+
# A mapping from model property names to API property names.
|
|
46
|
+
def self.names
|
|
47
|
+
@_hash = {} if @_hash.nil?
|
|
48
|
+
@_hash['type'] = 'type'
|
|
49
|
+
@_hash['title'] = 'title'
|
|
50
|
+
@_hash['sku'] = 'sku'
|
|
51
|
+
@_hash['quantity'] = 'quantity'
|
|
52
|
+
@_hash['unit_price'] = 'unitPrice'
|
|
53
|
+
@_hash['total_price'] = 'totalPrice'
|
|
54
|
+
@_hash['booking_reference'] = 'bookingReference'
|
|
55
|
+
@_hash
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# An array for optional fields
|
|
59
|
+
def self.optionals
|
|
60
|
+
[]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# An array for nullable fields
|
|
64
|
+
def self.nullables
|
|
65
|
+
[]
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def initialize(title:, sku:, quantity: 1, unit_price:, total_price:,
|
|
69
|
+
booking_reference:, additional_properties: nil)
|
|
70
|
+
# Add additional model properties to the instance
|
|
71
|
+
additional_properties = {} if additional_properties.nil?
|
|
72
|
+
|
|
73
|
+
@type = 'LODGING_RESERVATION'
|
|
74
|
+
@title = title
|
|
75
|
+
@sku = sku
|
|
76
|
+
@quantity = quantity
|
|
77
|
+
@unit_price = unit_price
|
|
78
|
+
@total_price = total_price
|
|
79
|
+
@booking_reference = booking_reference
|
|
80
|
+
@additional_properties = additional_properties
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Creates an instance of the object from a hash.
|
|
84
|
+
def self.from_hash(hash)
|
|
85
|
+
return nil unless hash
|
|
86
|
+
|
|
87
|
+
# Extract variables from the hash.
|
|
88
|
+
title = hash.key?('title') ? hash['title'] : nil
|
|
89
|
+
sku = hash.key?('sku') ? hash['sku'] : nil
|
|
90
|
+
quantity = hash['quantity'] ||= 1
|
|
91
|
+
unit_price = NonNegativeAmount.from_hash(hash['unitPrice']) if hash['unitPrice']
|
|
92
|
+
total_price = NonNegativeAmount.from_hash(hash['totalPrice']) if hash['totalPrice']
|
|
93
|
+
booking_reference =
|
|
94
|
+
hash.key?('bookingReference') ? hash['bookingReference'] : nil
|
|
95
|
+
|
|
96
|
+
# Create a new hash for additional properties, removing known properties.
|
|
97
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
98
|
+
|
|
99
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
100
|
+
new_hash, proc { |value| value }
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
# Create object from extracted values.
|
|
104
|
+
BundledLodgingReservation.new(title: title,
|
|
105
|
+
sku: sku,
|
|
106
|
+
quantity: quantity,
|
|
107
|
+
unit_price: unit_price,
|
|
108
|
+
total_price: total_price,
|
|
109
|
+
booking_reference: booking_reference,
|
|
110
|
+
additional_properties: additional_properties)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Validates an instance of the object from a given value.
|
|
114
|
+
# @param [BundledLodgingReservation | Hash] The value against the validation is performed.
|
|
115
|
+
def self.validate(value)
|
|
116
|
+
if value.instance_of? self
|
|
117
|
+
return (
|
|
118
|
+
APIHelper.valid_type?(value.type,
|
|
119
|
+
->(val) { val.instance_of? String }) and
|
|
120
|
+
APIHelper.valid_type?(value.title,
|
|
121
|
+
->(val) { val.instance_of? String }) and
|
|
122
|
+
APIHelper.valid_type?(value.sku,
|
|
123
|
+
->(val) { val.instance_of? String }) and
|
|
124
|
+
APIHelper.valid_type?(value.quantity,
|
|
125
|
+
->(val) { val.instance_of? Integer }) and
|
|
126
|
+
APIHelper.valid_type?(value.unit_price,
|
|
127
|
+
->(val) { NonNegativeAmount.validate(val) },
|
|
128
|
+
is_model_hash: true) and
|
|
129
|
+
APIHelper.valid_type?(value.total_price,
|
|
130
|
+
->(val) { NonNegativeAmount.validate(val) },
|
|
131
|
+
is_model_hash: true) and
|
|
132
|
+
APIHelper.valid_type?(value.booking_reference,
|
|
133
|
+
->(val) { val.instance_of? String })
|
|
134
|
+
)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
return false unless value.instance_of? Hash
|
|
138
|
+
|
|
139
|
+
(
|
|
140
|
+
APIHelper.valid_type?(value['type'],
|
|
141
|
+
->(val) { val.instance_of? String }) and
|
|
142
|
+
APIHelper.valid_type?(value['title'],
|
|
143
|
+
->(val) { val.instance_of? String }) and
|
|
144
|
+
APIHelper.valid_type?(value['sku'],
|
|
145
|
+
->(val) { val.instance_of? String }) and
|
|
146
|
+
APIHelper.valid_type?(value['quantity'],
|
|
147
|
+
->(val) { val.instance_of? Integer }) and
|
|
148
|
+
APIHelper.valid_type?(value['unitPrice'],
|
|
149
|
+
->(val) { NonNegativeAmount.validate(val) },
|
|
150
|
+
is_model_hash: true) and
|
|
151
|
+
APIHelper.valid_type?(value['totalPrice'],
|
|
152
|
+
->(val) { NonNegativeAmount.validate(val) },
|
|
153
|
+
is_model_hash: true) and
|
|
154
|
+
APIHelper.valid_type?(value['bookingReference'],
|
|
155
|
+
->(val) { val.instance_of? String })
|
|
156
|
+
)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Provides a human-readable string representation of the object.
|
|
160
|
+
def to_s
|
|
161
|
+
class_name = self.class.name.split('::').last
|
|
162
|
+
"<#{class_name} type: #{@type}, title: #{@title}, sku: #{@sku}, quantity: #{@quantity},"\
|
|
163
|
+
" unit_price: #{@unit_price}, total_price: #{@total_price}, booking_reference:"\
|
|
164
|
+
" #{@booking_reference}, additional_properties: #{@additional_properties}>"
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
168
|
+
def inspect
|
|
169
|
+
class_name = self.class.name.split('::').last
|
|
170
|
+
"<#{class_name} type: #{@type.inspect}, title: #{@title.inspect}, sku: #{@sku.inspect},"\
|
|
171
|
+
" quantity: #{@quantity.inspect}, unit_price: #{@unit_price.inspect}, total_price:"\
|
|
172
|
+
" #{@total_price.inspect}, booking_reference: #{@booking_reference.inspect},"\
|
|
173
|
+
" additional_properties: #{@additional_properties}>"
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
end
|
|
@@ -0,0 +1,161 @@
|
|
|
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
|
+
# Represents a product that is part of a bundle.
|
|
8
|
+
class BundledProduct < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Discriminator used to identify the type of line item.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_reader :type
|
|
15
|
+
|
|
16
|
+
# What should be shown as the title of the line item on a receipt or billing
|
|
17
|
+
# summary.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :title
|
|
20
|
+
|
|
21
|
+
# Stock Keeping Unit (SKU) is a product and service identification code for
|
|
22
|
+
# a specific product.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :sku
|
|
25
|
+
|
|
26
|
+
# Stock Keeping Unit (SKU) is a product and service identification code for
|
|
27
|
+
# a specific product.
|
|
28
|
+
# @return [Integer]
|
|
29
|
+
attr_accessor :quantity
|
|
30
|
+
|
|
31
|
+
# An amount that is a nonnegative number, i.e. {0, 1, 2, 3, 4, 5,…}
|
|
32
|
+
# @return [NonNegativeAmount]
|
|
33
|
+
attr_accessor :unit_price
|
|
34
|
+
|
|
35
|
+
# Total Price for the line item. Should be equal to `unitPrice` *
|
|
36
|
+
# `quantity`, if `unitPrice` is specified.
|
|
37
|
+
# @return [NonNegativeAmount]
|
|
38
|
+
attr_accessor :total_price
|
|
39
|
+
|
|
40
|
+
# A mapping from model property names to API property names.
|
|
41
|
+
def self.names
|
|
42
|
+
@_hash = {} if @_hash.nil?
|
|
43
|
+
@_hash['type'] = 'type'
|
|
44
|
+
@_hash['title'] = 'title'
|
|
45
|
+
@_hash['sku'] = 'sku'
|
|
46
|
+
@_hash['quantity'] = 'quantity'
|
|
47
|
+
@_hash['unit_price'] = 'unitPrice'
|
|
48
|
+
@_hash['total_price'] = 'totalPrice'
|
|
49
|
+
@_hash
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# An array for optional fields
|
|
53
|
+
def self.optionals
|
|
54
|
+
[]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# An array for nullable fields
|
|
58
|
+
def self.nullables
|
|
59
|
+
[]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def initialize(title:, sku:, quantity: 1, unit_price:, total_price:,
|
|
63
|
+
additional_properties: nil)
|
|
64
|
+
# Add additional model properties to the instance
|
|
65
|
+
additional_properties = {} if additional_properties.nil?
|
|
66
|
+
|
|
67
|
+
@type = 'PRODUCT'
|
|
68
|
+
@title = title
|
|
69
|
+
@sku = sku
|
|
70
|
+
@quantity = quantity
|
|
71
|
+
@unit_price = unit_price
|
|
72
|
+
@total_price = total_price
|
|
73
|
+
@additional_properties = additional_properties
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Creates an instance of the object from a hash.
|
|
77
|
+
def self.from_hash(hash)
|
|
78
|
+
return nil unless hash
|
|
79
|
+
|
|
80
|
+
# Extract variables from the hash.
|
|
81
|
+
title = hash.key?('title') ? hash['title'] : nil
|
|
82
|
+
sku = hash.key?('sku') ? hash['sku'] : nil
|
|
83
|
+
quantity = hash['quantity'] ||= 1
|
|
84
|
+
unit_price = NonNegativeAmount.from_hash(hash['unitPrice']) if hash['unitPrice']
|
|
85
|
+
total_price = NonNegativeAmount.from_hash(hash['totalPrice']) if hash['totalPrice']
|
|
86
|
+
|
|
87
|
+
# Create a new hash for additional properties, removing known properties.
|
|
88
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
89
|
+
|
|
90
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
91
|
+
new_hash, proc { |value| value }
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
# Create object from extracted values.
|
|
95
|
+
BundledProduct.new(title: title,
|
|
96
|
+
sku: sku,
|
|
97
|
+
quantity: quantity,
|
|
98
|
+
unit_price: unit_price,
|
|
99
|
+
total_price: total_price,
|
|
100
|
+
additional_properties: additional_properties)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Validates an instance of the object from a given value.
|
|
104
|
+
# @param [BundledProduct | Hash] The value against the validation is performed.
|
|
105
|
+
def self.validate(value)
|
|
106
|
+
if value.instance_of? self
|
|
107
|
+
return (
|
|
108
|
+
APIHelper.valid_type?(value.type,
|
|
109
|
+
->(val) { val.instance_of? String }) and
|
|
110
|
+
APIHelper.valid_type?(value.title,
|
|
111
|
+
->(val) { val.instance_of? String }) and
|
|
112
|
+
APIHelper.valid_type?(value.sku,
|
|
113
|
+
->(val) { val.instance_of? String }) and
|
|
114
|
+
APIHelper.valid_type?(value.quantity,
|
|
115
|
+
->(val) { val.instance_of? Integer }) and
|
|
116
|
+
APIHelper.valid_type?(value.unit_price,
|
|
117
|
+
->(val) { NonNegativeAmount.validate(val) },
|
|
118
|
+
is_model_hash: true) and
|
|
119
|
+
APIHelper.valid_type?(value.total_price,
|
|
120
|
+
->(val) { NonNegativeAmount.validate(val) },
|
|
121
|
+
is_model_hash: true)
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
return false unless value.instance_of? Hash
|
|
126
|
+
|
|
127
|
+
(
|
|
128
|
+
APIHelper.valid_type?(value['type'],
|
|
129
|
+
->(val) { val.instance_of? String }) and
|
|
130
|
+
APIHelper.valid_type?(value['title'],
|
|
131
|
+
->(val) { val.instance_of? String }) and
|
|
132
|
+
APIHelper.valid_type?(value['sku'],
|
|
133
|
+
->(val) { val.instance_of? String }) and
|
|
134
|
+
APIHelper.valid_type?(value['quantity'],
|
|
135
|
+
->(val) { val.instance_of? Integer }) and
|
|
136
|
+
APIHelper.valid_type?(value['unitPrice'],
|
|
137
|
+
->(val) { NonNegativeAmount.validate(val) },
|
|
138
|
+
is_model_hash: true) and
|
|
139
|
+
APIHelper.valid_type?(value['totalPrice'],
|
|
140
|
+
->(val) { NonNegativeAmount.validate(val) },
|
|
141
|
+
is_model_hash: true)
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Provides a human-readable string representation of the object.
|
|
146
|
+
def to_s
|
|
147
|
+
class_name = self.class.name.split('::').last
|
|
148
|
+
"<#{class_name} type: #{@type}, title: #{@title}, sku: #{@sku}, quantity: #{@quantity},"\
|
|
149
|
+
" unit_price: #{@unit_price}, total_price: #{@total_price}, additional_properties:"\
|
|
150
|
+
" #{@additional_properties}>"
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
154
|
+
def inspect
|
|
155
|
+
class_name = self.class.name.split('::').last
|
|
156
|
+
"<#{class_name} type: #{@type.inspect}, title: #{@title.inspect}, sku: #{@sku.inspect},"\
|
|
157
|
+
" quantity: #{@quantity.inspect}, unit_price: #{@unit_price.inspect}, total_price:"\
|
|
158
|
+
" #{@total_price.inspect}, additional_properties: #{@additional_properties}>"
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
# Buyer information.
|
|
8
|
+
class Buyer < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Full name of an individual.
|
|
13
|
+
# @return [CompletePersonName]
|
|
14
|
+
attr_accessor :name
|
|
15
|
+
|
|
16
|
+
# If the buyer is using a guest account. If `true`, then `account` should
|
|
17
|
+
# not be passed. `account` *must* be passed if this is `false`.
|
|
18
|
+
# @return [TrueClass | FalseClass]
|
|
19
|
+
attr_accessor :is_guest
|
|
20
|
+
|
|
21
|
+
# Account information for the buyer.
|
|
22
|
+
# @return [Account]
|
|
23
|
+
attr_accessor :account
|
|
24
|
+
|
|
25
|
+
# Identifier of the customer in the merchant's system.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :merchant_customer_id
|
|
28
|
+
|
|
29
|
+
# Buyer's set locale.
|
|
30
|
+
# A combined string using a combination of standards for a language
|
|
31
|
+
# description - the ISO 639-1 standard
|
|
32
|
+
# and a locale description - the ISO 3166 standard, which together make up
|
|
33
|
+
# the BCP-47 standard.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :locale
|
|
36
|
+
|
|
37
|
+
# Country of residence set by Buyer.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :country
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['name'] = 'name'
|
|
45
|
+
@_hash['is_guest'] = 'isGuest'
|
|
46
|
+
@_hash['account'] = 'account'
|
|
47
|
+
@_hash['merchant_customer_id'] = 'merchantCustomerId'
|
|
48
|
+
@_hash['locale'] = 'locale'
|
|
49
|
+
@_hash['country'] = 'country'
|
|
50
|
+
@_hash
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for optional fields
|
|
54
|
+
def self.optionals
|
|
55
|
+
%w[
|
|
56
|
+
name
|
|
57
|
+
account
|
|
58
|
+
locale
|
|
59
|
+
country
|
|
60
|
+
]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# An array for nullable fields
|
|
64
|
+
def self.nullables
|
|
65
|
+
[]
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def initialize(is_guest:, merchant_customer_id:, name: SKIP, account: SKIP,
|
|
69
|
+
locale: SKIP, country: SKIP, additional_properties: nil)
|
|
70
|
+
# Add additional model properties to the instance
|
|
71
|
+
additional_properties = {} if additional_properties.nil?
|
|
72
|
+
|
|
73
|
+
@name = name unless name == SKIP
|
|
74
|
+
@is_guest = is_guest
|
|
75
|
+
@account = account unless account == SKIP
|
|
76
|
+
@merchant_customer_id = merchant_customer_id
|
|
77
|
+
@locale = locale unless locale == SKIP
|
|
78
|
+
@country = country unless country == SKIP
|
|
79
|
+
@additional_properties = additional_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Creates an instance of the object from a hash.
|
|
83
|
+
def self.from_hash(hash)
|
|
84
|
+
return nil unless hash
|
|
85
|
+
|
|
86
|
+
# Extract variables from the hash.
|
|
87
|
+
is_guest = hash.key?('isGuest') ? hash['isGuest'] : nil
|
|
88
|
+
merchant_customer_id =
|
|
89
|
+
hash.key?('merchantCustomerId') ? hash['merchantCustomerId'] : nil
|
|
90
|
+
name = CompletePersonName.from_hash(hash['name']) if hash['name']
|
|
91
|
+
account = Account.from_hash(hash['account']) if hash['account']
|
|
92
|
+
locale = hash.key?('locale') ? hash['locale'] : SKIP
|
|
93
|
+
country = hash.key?('country') ? hash['country'] : SKIP
|
|
94
|
+
|
|
95
|
+
# Create a new hash for additional properties, removing known properties.
|
|
96
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
97
|
+
|
|
98
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
99
|
+
new_hash, proc { |value| value }
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Create object from extracted values.
|
|
103
|
+
Buyer.new(is_guest: is_guest,
|
|
104
|
+
merchant_customer_id: merchant_customer_id,
|
|
105
|
+
name: name,
|
|
106
|
+
account: account,
|
|
107
|
+
locale: locale,
|
|
108
|
+
country: country,
|
|
109
|
+
additional_properties: additional_properties)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Provides a human-readable string representation of the object.
|
|
113
|
+
def to_s
|
|
114
|
+
class_name = self.class.name.split('::').last
|
|
115
|
+
"<#{class_name} name: #{@name}, is_guest: #{@is_guest}, account: #{@account},"\
|
|
116
|
+
" merchant_customer_id: #{@merchant_customer_id}, locale: #{@locale}, country: #{@country},"\
|
|
117
|
+
" additional_properties: #{@additional_properties}>"
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
121
|
+
def inspect
|
|
122
|
+
class_name = self.class.name.split('::').last
|
|
123
|
+
"<#{class_name} name: #{@name.inspect}, is_guest: #{@is_guest.inspect}, account:"\
|
|
124
|
+
" #{@account.inspect}, merchant_customer_id: #{@merchant_customer_id.inspect}, locale:"\
|
|
125
|
+
" #{@locale.inspect}, country: #{@country.inspect}, additional_properties:"\
|
|
126
|
+
" #{@additional_properties}>"
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|