Class: Stripe::V2::Billing::ContractUpdateParams::PricingLineAction

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/v2/billing/contract_update_params.rb

Defined Under Namespace

Classes: Add, Remove, Update

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, new, #to_h

Constructor Details

#initialize(add: nil, remove: nil, type: nil, update: nil) ⇒ PricingLineAction

Returns a new instance of PricingLineAction.



516
517
518
519
520
521
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 516

def initialize(add: nil, remove: nil, type: nil, update: nil)
  @add = add
  @remove = remove
  @type = type
  @update = update
end

Instance Attribute Details

#addObject

Add a pricing line.



508
509
510
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 508

def add
  @add
end

#removeObject

Remove a pricing line.



510
511
512
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 510

def remove
  @remove
end

#typeObject

The type of pricing line action.



512
513
514
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 512

def type
  @type
end

#updateObject

Update a pricing line.



514
515
516
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 514

def update
  @update
end

Class Method Details

.field_encodingsObject



523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 523

def self.field_encodings
  @field_encodings = {
    add: {
      kind: :object,
      fields: {
        pricing: {
          kind: :object,
          fields: {
            price_details: {
              kind: :object,
              fields: {
                quantity_changes: {
                  kind: :array,
                  element: { kind: :object, fields: { set: :decimal_string } },
                },
              },
            },
          },
        },
      },
    },
    update: {
      kind: :object,
      fields: {
        pricing: {
          kind: :object,
          fields: {
            price_details: {
              kind: :object,
              fields: {
                quantity_changes: {
                  kind: :array,
                  element: { kind: :object, fields: { set: :decimal_string } },
                },
              },
            },
          },
        },
      },
    },
  }
end