Class: StickyIoRestfulApiV2025731::DataGetCustomerSubscriptions
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- StickyIoRestfulApiV2025731::DataGetCustomerSubscriptions
- Defined in:
- lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb
Overview
DataGetCustomerSubscriptions Model.
Instance Attribute Summary collapse
-
#billing_model ⇒ BillingModelData
TODO: Write general description for this method.
-
#created_at ⇒ String
TODO: Write general description for this method.
-
#credit ⇒ String
TODO: Write general description for this method.
-
#depth ⇒ Integer
TODO: Write general description for this method.
-
#discounts ⇒ Discounts
TODO: Write general description for this method.
-
#forecasted_revenue ⇒ String
TODO: Write general description for this method.
-
#id ⇒ String
TODO: Write general description for this method.
-
#is_recurring ⇒ Integer
TODO: Write general description for this method.
-
#next_product ⇒ NextProduct
TODO: Write general description for this method.
-
#order_id ⇒ Integer
TODO: Write general description for this method.
-
#product ⇒ ProductData1
TODO: Write general description for this method.
-
#recur_at ⇒ String
TODO: Write general description for this method.
-
#shipping ⇒ Shipping
TODO: Write general description for this method.
-
#status ⇒ 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.
Instance Method Summary collapse
-
#initialize(id:, order_id:, created_at:, is_recurring:, recur_at:, depth:, forecasted_revenue:, credit:, product:, next_product:, shipping:, discounts:, status:, billing_model:, additional_properties: nil) ⇒ DataGetCustomerSubscriptions
constructor
A new instance of DataGetCustomerSubscriptions.
-
#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(id:, order_id:, created_at:, is_recurring:, recur_at:, depth:, forecasted_revenue:, credit:, product:, next_product:, shipping:, discounts:, status:, billing_model:, additional_properties: nil) ⇒ DataGetCustomerSubscriptions
Returns a new instance of DataGetCustomerSubscriptions.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 98 def initialize(id:, order_id:, created_at:, is_recurring:, recur_at:, depth:, forecasted_revenue:, credit:, product:, next_product:, shipping:, discounts:, status:, billing_model:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id @order_id = order_id @created_at = created_at @is_recurring = is_recurring @recur_at = recur_at @depth = depth @forecasted_revenue = forecasted_revenue @credit = credit @product = product @next_product = next_product @shipping = shipping @discounts = discounts @status = status @billing_model = billing_model @additional_properties = additional_properties end |
Instance Attribute Details
#billing_model ⇒ BillingModelData
TODO: Write general description for this method
66 67 68 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 66 def billing_model @billing_model end |
#created_at ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 22 def created_at @created_at end |
#credit ⇒ String
TODO: Write general description for this method
42 43 44 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 42 def credit @credit end |
#depth ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 34 def depth @depth end |
#discounts ⇒ Discounts
TODO: Write general description for this method
58 59 60 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 58 def discounts @discounts end |
#forecasted_revenue ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 38 def forecasted_revenue @forecasted_revenue end |
#id ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 14 def id @id end |
#is_recurring ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 26 def is_recurring @is_recurring end |
#next_product ⇒ NextProduct
TODO: Write general description for this method
50 51 52 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 50 def next_product @next_product end |
#order_id ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 18 def order_id @order_id end |
#product ⇒ ProductData1
TODO: Write general description for this method
46 47 48 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 46 def product @product end |
#recur_at ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 30 def recur_at @recur_at end |
#shipping ⇒ Shipping
TODO: Write general description for this method
54 55 56 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 54 def shipping @shipping end |
#status ⇒ String
TODO: Write general description for this method
62 63 64 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 62 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 123 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : nil order_id = hash.key?('order_id') ? hash['order_id'] : nil created_at = hash.key?('created_at') ? hash['created_at'] : nil is_recurring = hash.key?('is_recurring') ? hash['is_recurring'] : nil recur_at = hash.key?('recur_at') ? hash['recur_at'] : nil depth = hash.key?('depth') ? hash['depth'] : nil forecasted_revenue = hash.key?('forecasted_revenue') ? hash['forecasted_revenue'] : nil credit = hash.key?('credit') ? hash['credit'] : nil product = ProductData1.from_hash(hash['product']) if hash['product'] next_product = NextProduct.from_hash(hash['next_product']) if hash['next_product'] shipping = Shipping.from_hash(hash['shipping']) if hash['shipping'] discounts = Discounts.from_hash(hash['discounts']) if hash['discounts'] status = hash.key?('status') ? hash['status'] : nil billing_model = BillingModelData.from_hash(hash['billing_model']) if hash['billing_model'] # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. DataGetCustomerSubscriptions.new(id: id, order_id: order_id, created_at: created_at, is_recurring: is_recurring, recur_at: recur_at, depth: depth, forecasted_revenue: forecasted_revenue, credit: credit, product: product, next_product: next_product, shipping: shipping, discounts: discounts, status: status, billing_model: billing_model, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 69 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['order_id'] = 'order_id' @_hash['created_at'] = 'created_at' @_hash['is_recurring'] = 'is_recurring' @_hash['recur_at'] = 'recur_at' @_hash['depth'] = 'depth' @_hash['forecasted_revenue'] = 'forecasted_revenue' @_hash['credit'] = 'credit' @_hash['product'] = 'product' @_hash['next_product'] = 'next_product' @_hash['shipping'] = 'shipping' @_hash['discounts'] = 'discounts' @_hash['status'] = 'status' @_hash['billing_model'] = 'billing_model' @_hash end |
.nullables ⇒ Object
An array for nullable fields
94 95 96 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 94 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
89 90 91 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 89 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
180 181 182 183 184 185 186 187 188 189 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 180 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, order_id: #{@order_id.inspect}, created_at:"\ " #{@created_at.inspect}, is_recurring: #{@is_recurring.inspect}, recur_at:"\ " #{@recur_at.inspect}, depth: #{@depth.inspect}, forecasted_revenue:"\ " #{@forecasted_revenue.inspect}, credit: #{@credit.inspect}, product: #{@product.inspect},"\ " next_product: #{@next_product.inspect}, shipping: #{@shipping.inspect}, discounts:"\ " #{@discounts.inspect}, status: #{@status.inspect}, billing_model:"\ " #{@billing_model.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
169 170 171 172 173 174 175 176 177 |
# File 'lib/sticky_io_restful_api_v2025731/models/data_get_customer_subscriptions.rb', line 169 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, order_id: #{@order_id}, created_at: #{@created_at},"\ " is_recurring: #{@is_recurring}, recur_at: #{@recur_at}, depth: #{@depth},"\ " forecasted_revenue: #{@forecasted_revenue}, credit: #{@credit}, product: #{@product},"\ " next_product: #{@next_product}, shipping: #{@shipping}, discounts: #{@discounts}, status:"\ " #{@status}, billing_model: #{@billing_model}, additional_properties:"\ " #{@additional_properties}>" end |