Class: PaypalServerSdk::UpdatePricingScheme
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::UpdatePricingScheme
- Defined in:
- lib/paypal_server_sdk/models/update_pricing_scheme.rb
Overview
The update pricing scheme request details.
Instance Attribute Summary collapse
-
#billing_cycle_sequence ⇒ Integer
The billing cycle sequence.
-
#pricing_scheme ⇒ SubscriptionPricingScheme
The pricing scheme details.
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.
Instance Method Summary collapse
-
#initialize(billing_cycle_sequence:, pricing_scheme:) ⇒ UpdatePricingScheme
constructor
A new instance of UpdatePricingScheme.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(billing_cycle_sequence:, pricing_scheme:) ⇒ UpdatePricingScheme
Returns a new instance of UpdatePricingScheme.
38 39 40 41 |
# File 'lib/paypal_server_sdk/models/update_pricing_scheme.rb', line 38 def initialize(billing_cycle_sequence:, pricing_scheme:) @billing_cycle_sequence = billing_cycle_sequence @pricing_scheme = pricing_scheme end |
Instance Attribute Details
#billing_cycle_sequence ⇒ Integer
The billing cycle sequence.
14 15 16 |
# File 'lib/paypal_server_sdk/models/update_pricing_scheme.rb', line 14 def billing_cycle_sequence @billing_cycle_sequence end |
#pricing_scheme ⇒ SubscriptionPricingScheme
The pricing scheme details.
18 19 20 |
# File 'lib/paypal_server_sdk/models/update_pricing_scheme.rb', line 18 def pricing_scheme @pricing_scheme end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/paypal_server_sdk/models/update_pricing_scheme.rb', line 44 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. billing_cycle_sequence = hash.key?('billing_cycle_sequence') ? hash['billing_cycle_sequence'] : nil pricing_scheme = SubscriptionPricingScheme.from_hash(hash['pricing_scheme']) if hash['pricing_scheme'] # Create object from extracted values. UpdatePricingScheme.new(billing_cycle_sequence: billing_cycle_sequence, pricing_scheme: pricing_scheme) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/paypal_server_sdk/models/update_pricing_scheme.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['billing_cycle_sequence'] = 'billing_cycle_sequence' @_hash['pricing_scheme'] = 'pricing_scheme' @_hash end |
.nullables ⇒ Object
An array for nullable fields
34 35 36 |
# File 'lib/paypal_server_sdk/models/update_pricing_scheme.rb', line 34 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 |
# File 'lib/paypal_server_sdk/models/update_pricing_scheme.rb', line 29 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
66 67 68 69 70 |
# File 'lib/paypal_server_sdk/models/update_pricing_scheme.rb', line 66 def inspect class_name = self.class.name.split('::').last "<#{class_name} billing_cycle_sequence: #{@billing_cycle_sequence.inspect}, pricing_scheme:"\ " #{@pricing_scheme.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
59 60 61 62 63 |
# File 'lib/paypal_server_sdk/models/update_pricing_scheme.rb', line 59 def to_s class_name = self.class.name.split('::').last "<#{class_name} billing_cycle_sequence: #{@billing_cycle_sequence}, pricing_scheme:"\ " #{@pricing_scheme}>" end |