Class: MetronomeSDK::Models::V1::Customers::InvoiceAddChargeParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/metronome_sdk/models/v1/customers/invoice_add_charge_params.rb,
sig/metronome_sdk/models/v1/customers/invoice_add_charge_params.rbs

Overview

See Also:

  • MetronomeSDK::Resources::V1::Customers::Invoices#add_charge

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::MetronomeSDK

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(customer_id:, charge_id:, customer_plan_id:, description:, invoice_start_timestamp:, price:, quantity:, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see MetronomeSDK::Models::V1::Customers::InvoiceAddChargeParams for more details.

Parameters:

  • customer_id (String)
  • charge_id (String)

    The Metronome ID of the charge to add to the invoice. Note that the charge must

  • customer_plan_id (String)

    The Metronome ID of the customer plan to add the charge to.

  • description (String)
  • invoice_start_timestamp (Time)

    The start_timestamp of the invoice to add the charge to.

  • price (Float)

    The price of the charge. This price will match the currency on the invoice, e.g.

  • quantity (Float)
  • request_options (MetronomeSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/metronome_sdk/models/v1/customers/invoice_add_charge_params.rb', line 54

Instance Attribute Details

#charge_idString

The Metronome ID of the charge to add to the invoice. Note that the charge must be on a product that is not on the current plan, and the product must have only fixed charges.

Parameters:

  • value (String)

Returns:

  • (String)


23
# File 'lib/metronome_sdk/models/v1/customers/invoice_add_charge_params.rb', line 23

required :charge_id, String

#customer_idString

Parameters:

  • value (String)

Returns:

  • (String)


15
# File 'lib/metronome_sdk/models/v1/customers/invoice_add_charge_params.rb', line 15

required :customer_id, String

#customer_plan_idString

The Metronome ID of the customer plan to add the charge to.

Parameters:

  • value (String)

Returns:

  • (String)


29
# File 'lib/metronome_sdk/models/v1/customers/invoice_add_charge_params.rb', line 29

required :customer_plan_id, String

#descriptionString

Parameters:

  • value (String)

Returns:

  • (String)


34
# File 'lib/metronome_sdk/models/v1/customers/invoice_add_charge_params.rb', line 34

required :description, String

#invoice_start_timestampTime

The start_timestamp of the invoice to add the charge to.

Parameters:

  • value (Time)

Returns:

  • (Time)


40
# File 'lib/metronome_sdk/models/v1/customers/invoice_add_charge_params.rb', line 40

required :invoice_start_timestamp, Time

#priceFloat

The price of the charge. This price will match the currency on the invoice, e.g. USD cents.

Parameters:

  • value (Float)

Returns:

  • (Float)


47
# File 'lib/metronome_sdk/models/v1/customers/invoice_add_charge_params.rb', line 47

required :price, Float

#quantityFloat

Parameters:

  • value (Float)

Returns:

  • (Float)


52
# File 'lib/metronome_sdk/models/v1/customers/invoice_add_charge_params.rb', line 52

required :quantity, Float

Instance Method Details

#to_hash{

Returns:

  • ({)


46
# File 'sig/metronome_sdk/models/v1/customers/invoice_add_charge_params.rbs', line 46

def to_hash: -> {