Class: OCI::Onesubscription::Models::BillingScheduleSummary
- Inherits:
-
Object
- Object
- OCI::Onesubscription::Models::BillingScheduleSummary
- Defined in:
- lib/oci/onesubscription/models/billing_schedule_summary.rb
Overview
Billing schedule details related to Subscription Id
Constant Summary collapse
- INVOICE_STATUS_ENUM =
[ INVOICE_STATUS_INVOICED = 'INVOICED'.freeze, INVOICE_STATUS_NOT_INVOICED = 'NOT_INVOICED'.freeze, INVOICE_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#amount ⇒ String
Billing schedule line net amount.
-
#ar_customer_transaction_id ⇒ String
Indicates the associated AR Customer transaction id a unique identifier existing on AR.
-
#ar_invoice_number ⇒ String
Indicates the associated AR Invoice Number.
-
#billing_frequency ⇒ String
Billing frequency.
-
#invoice_status ⇒ String
Billing schedule invoice status.
-
#net_unit_price ⇒ String
Billing schedule net unit price.
-
#order_number ⇒ String
Order number associated with the Subscribed Service.
- #product ⇒ OCI::Onesubscription::Models::BillingScheduleProduct
-
#quantity ⇒ String
Billing schedule quantity.
-
#subscribed_service_id ⇒ String
SPM internal Subscribed Service ID.
-
#time_end ⇒ DateTime
Billing schedule end date.
-
#time_invoicing ⇒ DateTime
Billing schedule invoicing date.
-
#time_start ⇒ DateTime
Billing schedule start date.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ BillingScheduleSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ BillingScheduleSummary
Initializes the object
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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 142 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.subscribed_service_id = attributes[:'subscribedServiceId'] if attributes[:'subscribedServiceId'] raise 'You cannot provide both :subscribedServiceId and :subscribed_service_id' if attributes.key?(:'subscribedServiceId') && attributes.key?(:'subscribed_service_id') self.subscribed_service_id = attributes[:'subscribed_service_id'] if attributes[:'subscribed_service_id'] self.time_start = attributes[:'timeStart'] if attributes[:'timeStart'] raise 'You cannot provide both :timeStart and :time_start' if attributes.key?(:'timeStart') && attributes.key?(:'time_start') self.time_start = attributes[:'time_start'] if attributes[:'time_start'] self.time_end = attributes[:'timeEnd'] if attributes[:'timeEnd'] raise 'You cannot provide both :timeEnd and :time_end' if attributes.key?(:'timeEnd') && attributes.key?(:'time_end') self.time_end = attributes[:'time_end'] if attributes[:'time_end'] self.time_invoicing = attributes[:'timeInvoicing'] if attributes[:'timeInvoicing'] raise 'You cannot provide both :timeInvoicing and :time_invoicing' if attributes.key?(:'timeInvoicing') && attributes.key?(:'time_invoicing') self.time_invoicing = attributes[:'time_invoicing'] if attributes[:'time_invoicing'] self.invoice_status = attributes[:'invoiceStatus'] if attributes[:'invoiceStatus'] raise 'You cannot provide both :invoiceStatus and :invoice_status' if attributes.key?(:'invoiceStatus') && attributes.key?(:'invoice_status') self.invoice_status = attributes[:'invoice_status'] if attributes[:'invoice_status'] self.quantity = attributes[:'quantity'] if attributes[:'quantity'] self.net_unit_price = attributes[:'netUnitPrice'] if attributes[:'netUnitPrice'] raise 'You cannot provide both :netUnitPrice and :net_unit_price' if attributes.key?(:'netUnitPrice') && attributes.key?(:'net_unit_price') self.net_unit_price = attributes[:'net_unit_price'] if attributes[:'net_unit_price'] self.amount = attributes[:'amount'] if attributes[:'amount'] self.billing_frequency = attributes[:'billingFrequency'] if attributes[:'billingFrequency'] raise 'You cannot provide both :billingFrequency and :billing_frequency' if attributes.key?(:'billingFrequency') && attributes.key?(:'billing_frequency') self.billing_frequency = attributes[:'billing_frequency'] if attributes[:'billing_frequency'] self.ar_invoice_number = attributes[:'arInvoiceNumber'] if attributes[:'arInvoiceNumber'] raise 'You cannot provide both :arInvoiceNumber and :ar_invoice_number' if attributes.key?(:'arInvoiceNumber') && attributes.key?(:'ar_invoice_number') self.ar_invoice_number = attributes[:'ar_invoice_number'] if attributes[:'ar_invoice_number'] self.ar_customer_transaction_id = attributes[:'arCustomerTransactionId'] if attributes[:'arCustomerTransactionId'] raise 'You cannot provide both :arCustomerTransactionId and :ar_customer_transaction_id' if attributes.key?(:'arCustomerTransactionId') && attributes.key?(:'ar_customer_transaction_id') self.ar_customer_transaction_id = attributes[:'ar_customer_transaction_id'] if attributes[:'ar_customer_transaction_id'] self.order_number = attributes[:'orderNumber'] if attributes[:'orderNumber'] raise 'You cannot provide both :orderNumber and :order_number' if attributes.key?(:'orderNumber') && attributes.key?(:'order_number') self.order_number = attributes[:'order_number'] if attributes[:'order_number'] self.product = attributes[:'product'] if attributes[:'product'] end |
Instance Attribute Details
#amount ⇒ String
Billing schedule line net amount
56 57 58 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 56 def amount @amount end |
#ar_customer_transaction_id ⇒ String
Indicates the associated AR Customer transaction id a unique identifier existing on AR.
71 72 73 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 71 def ar_customer_transaction_id @ar_customer_transaction_id end |
#ar_invoice_number ⇒ String
Indicates the associated AR Invoice Number
66 67 68 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 66 def ar_invoice_number @ar_invoice_number end |
#billing_frequency ⇒ String
Billing frequency
61 62 63 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 61 def billing_frequency @billing_frequency end |
#invoice_status ⇒ String
Billing schedule invoice status
41 42 43 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 41 def invoice_status @invoice_status end |
#net_unit_price ⇒ String
Billing schedule net unit price
51 52 53 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 51 def net_unit_price @net_unit_price end |
#order_number ⇒ String
Order number associated with the Subscribed Service
76 77 78 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 76 def order_number @order_number end |
#product ⇒ OCI::Onesubscription::Models::BillingScheduleProduct
79 80 81 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 79 def product @product end |
#quantity ⇒ String
Billing schedule quantity
46 47 48 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 46 def quantity @quantity end |
#subscribed_service_id ⇒ String
SPM internal Subscribed Service ID
21 22 23 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 21 def subscribed_service_id @subscribed_service_id end |
#time_end ⇒ DateTime
Billing schedule end date
31 32 33 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 31 def time_end @time_end end |
#time_invoicing ⇒ DateTime
Billing schedule invoicing date
36 37 38 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 36 def time_invoicing @time_invoicing end |
#time_start ⇒ DateTime
Billing schedule start date
26 27 28 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 26 def time_start @time_start end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 82 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'subscribed_service_id': :'subscribedServiceId', 'time_start': :'timeStart', 'time_end': :'timeEnd', 'time_invoicing': :'timeInvoicing', 'invoice_status': :'invoiceStatus', 'quantity': :'quantity', 'net_unit_price': :'netUnitPrice', 'amount': :'amount', 'billing_frequency': :'billingFrequency', 'ar_invoice_number': :'arInvoiceNumber', 'ar_customer_transaction_id': :'arCustomerTransactionId', 'order_number': :'orderNumber', 'product': :'product' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 103 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'subscribed_service_id': :'String', 'time_start': :'DateTime', 'time_end': :'DateTime', 'time_invoicing': :'DateTime', 'invoice_status': :'String', 'quantity': :'String', 'net_unit_price': :'String', 'amount': :'String', 'billing_frequency': :'String', 'ar_invoice_number': :'String', 'ar_customer_transaction_id': :'String', 'order_number': :'String', 'product': :'OCI::Onesubscription::Models::BillingScheduleProduct' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 235 def ==(other) return true if equal?(other) self.class == other.class && subscribed_service_id == other.subscribed_service_id && time_start == other.time_start && time_end == other.time_end && time_invoicing == other.time_invoicing && invoice_status == other.invoice_status && quantity == other.quantity && net_unit_price == other.net_unit_price && amount == other.amount && billing_frequency == other.billing_frequency && ar_invoice_number == other.ar_invoice_number && ar_customer_transaction_id == other.ar_customer_transaction_id && order_number == other.order_number && product == other.product end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 277 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
257 258 259 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 257 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
266 267 268 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 266 def hash [subscribed_service_id, time_start, time_end, time_invoicing, invoice_status, quantity, net_unit_price, amount, billing_frequency, ar_invoice_number, ar_customer_transaction_id, order_number, product].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
310 311 312 313 314 315 316 317 318 319 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 310 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
304 305 306 |
# File 'lib/oci/onesubscription/models/billing_schedule_summary.rb', line 304 def to_s to_hash.to_s end |