Class: AdvancedBilling::PaymentMethodExternalType
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::PaymentMethodExternalType
- Defined in:
- lib/advanced_billing/models/payment_method_external_type.rb
Overview
PaymentMethodExternalType Model.
Instance Attribute Summary collapse
-
#details ⇒ String
TODO: Write general description for this method.
-
#kind ⇒ String
TODO: Write general description for this method.
-
#memo ⇒ String
TODO: Write general description for this method.
-
#type ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(details = SKIP, kind = SKIP, memo = SKIP, type = 'external') ⇒ PaymentMethodExternalType
constructor
A new instance of PaymentMethodExternalType.
Methods inherited from BaseModel
Constructor Details
#initialize(details = SKIP, kind = SKIP, memo = SKIP, type = 'external') ⇒ PaymentMethodExternalType
Returns a new instance of PaymentMethodExternalType.
53 54 55 56 57 58 |
# File 'lib/advanced_billing/models/payment_method_external_type.rb', line 53 def initialize(details = SKIP, kind = SKIP, memo = SKIP, type = 'external') @details = details unless details == SKIP @kind = kind unless kind == SKIP @memo = memo unless memo == SKIP @type = type unless type == SKIP end |
Instance Attribute Details
#details ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/models/payment_method_external_type.rb', line 14 def details @details end |
#kind ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/advanced_billing/models/payment_method_external_type.rb', line 18 def kind @kind end |
#memo ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/advanced_billing/models/payment_method_external_type.rb', line 22 def memo @memo end |
#type ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/advanced_billing/models/payment_method_external_type.rb', line 26 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/advanced_billing/models/payment_method_external_type.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. details = hash.key?('details') ? hash['details'] : SKIP kind = hash.key?('kind') ? hash['kind'] : SKIP memo = hash.key?('memo') ? hash['memo'] : SKIP type = hash['type'] ||= 'external' # Create object from extracted values. PaymentMethodExternalType.new(details, kind, memo, type) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/advanced_billing/models/payment_method_external_type.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['details'] = 'details' @_hash['kind'] = 'kind' @_hash['memo'] = 'memo' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/advanced_billing/models/payment_method_external_type.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/advanced_billing/models/payment_method_external_type.rb', line 39 def self.optionals %w[ details kind memo type ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
79 80 81 82 83 84 85 |
# File 'lib/advanced_billing/models/payment_method_external_type.rb', line 79 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |