Class: PayPal::SDK::REST::DataTypes::Base
Direct Known Subclasses
Agreement, AgreementDetails, AgreementStateDescriptor, AgreementTransaction, AgreementTransactions, AllOf, AlternatePayment, Amount, AnyOf, Authorization, BankAccount, BankAccountsList, BankToken, BaseAddress, Billing, BillingAgreementToken, BillingInfo, Buyer, CancelNotification, Capture, CarrierAccountToken, CartBase, ChargeModels, Cost, CountryCode, Credit, CreditCard, CreditCardList, CreditCardToken, CreditFinancingOffered, Currency, CurrencyConversion, CustomAmount, Details, Dispute, DisputeOutcome, Error, ErrorDetails, EventType, EventTypeList, ExternalFunding, FileAttachment, FlowConfig, FmfDetails, FundingDetail, FundingInstrument, FundingOption, FundingSource, Incentive, InputFields, InstallmentInfo, InstallmentOption, Invoice, InvoiceAmountWrapper, InvoiceItem, Invoices, InvoicingMetaData, InvoicingNotification, InvoicingPaymentDetail, InvoicingRefundDetail, InvoicingSearch, Item, ItemInfo, ItemList, Links, Measurement, MerchantInfo, MerchantPreferences, Messages, Metadata, Money, NameValuePair, Notification, Offer, OneOf, Order, OverrideChargeModel, Participant, Patch, PatchRequest, Payee, Payer, PayerInfo, Payment, PaymentCard, PaymentDefinition, PaymentDetail, PaymentExecution, PaymentHistory, PaymentInstruction, PaymentOptions, PaymentSummary, PaymentTerm, Payout, PayoutBatch, PayoutBatchHeader, PayoutItem, PayoutItemDetails, PayoutSenderBatchHeader, Percentage, Phone, Plan, PlanList, PotentialPayerInfo, Presentation, PrivateLabelCard, ProcessorResponse, RecipientBankingInstruction, RedirectUrls, Refund, RefundDetail, RefundRequest, RelatedResources, Sale, Schema, Search, Seller, ShippingAddress, ShippingCost, ShippingInfo, Tax, Template, TemplateData, TemplateSettings, TemplateSettingsMetadata, Templates, Terms, Transaction, TransactionInfo, WebProfile, WebProfileList, Webhook, WebhookEvent, WebhookEventList, WebhookList, WebhooksEventType
Defined Under Namespace
Classes: Number
Constant Summary
Core::API::DataTypes::Base::ContentKey, Core::API::DataTypes::Base::HashOptions
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
add_attribute, add_member, array_of, #convert_array, #convert_object, define_alias_methods, #hash_key, #initialize, #member_names, members, #members, object_of, #set, #skip_value?, snakecase, #to_hash, #value_to_hash
#log_event, #logger, logger, logger=
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
12
13
14
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 12
def error
@error
end
|
15
16
17
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 15
def
@header ||= {}
end
|
#request_id ⇒ Object
19
20
21
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 19
def request_id
@request_id ||= SecureRandom.uuid
end
|
Class Method Details
.load_members ⇒ Object
40
41
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 40
def self.load_members
end
|
.raise_on_api_error(*methods) ⇒ Object
43
44
45
46
47
48
49
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 43
def self.raise_on_api_error(*methods)
methods.each do |symbol|
define_method("#{symbol}!") {|*arg|
raise_error! unless send(symbol, *arg)
}
end
end
|
Instance Method Details
23
24
25
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 23
def
{ "PayPal-Request-Id" => request_id.to_s }.merge()
end
|
#merge!(values) ⇒ Object
31
32
33
34
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 31
def merge!(values)
@error = nil
super
end
|
27
28
29
|
# File 'lib/paypal-sdk/rest/data_types.rb', line 27
def success?
@error.nil?
end
|