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.



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

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.



505
506
507
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 505

def add
  @add
end

#removeObject

Remove a pricing line.



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

def remove
  @remove
end

#typeObject

The type of pricing line action.



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

def type
  @type
end

#updateObject

Update a pricing line.



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

def update
  @update
end

Class Method Details

.field_encodingsObject



520
521
522
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
# File 'lib/stripe/params/v2/billing/contract_update_params.rb', line 520

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