Module: PayPal::SDK::Subscriptions::RequestDataType
- Included in:
- RequestAPIBase
- Defined in:
- lib/paypal-sdk/subscriptions/request_data_type.rb
Class Method Summary collapse
-
.api ⇒ Object
Global API object === Example RequestDataType.api.
-
.included(klass) ⇒ Object
Configure depended module, when RequestDataType is include.
Instance Method Summary collapse
-
#api ⇒ Object
Get a local API object or Class level API object.
-
#error=(hash) ⇒ Object
Convert Hash object to ErrorHash object.
Class Method Details
.api ⇒ Object
51 52 53 |
# File 'lib/paypal-sdk/subscriptions/request_data_type.rb', line 51 def api @api ||= API.new end |
.included(klass) ⇒ Object
Configure depended module, when RequestDataType is include.
Example
class Payment < DataTypes
include RequestDataType
end
Payment.api
payment.api
62 63 64 65 66 |
# File 'lib/paypal-sdk/subscriptions/request_data_type.rb', line 62 def included(klass) klass.class_eval do extend GetAPI end end |
Instance Method Details
#api ⇒ Object
Get a local API object or Class level API object
33 34 35 |
# File 'lib/paypal-sdk/subscriptions/request_data_type.rb', line 33 def api @api || self.class.api end |