Class: Stripe::Tax::TransactionService::CreateFromCalculationParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/tax/transaction_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(calculation: nil, expand: nil, metadata: nil, posted_at: nil, reference: nil) ⇒ CreateFromCalculationParams

Returns a new instance of CreateFromCalculationParams.



35
36
37
38
39
40
41
# File 'lib/stripe/services/tax/transaction_service.rb', line 35

def initialize(calculation: nil, expand: nil, metadata: nil, posted_at: nil, reference: nil)
  @calculation = calculation
  @expand = expand
  @metadata = 
  @posted_at = posted_at
  @reference = reference
end

Instance Attribute Details

#calculationObject

Tax Calculation ID to be used as input when creating the transaction.



25
26
27
# File 'lib/stripe/services/tax/transaction_service.rb', line 25

def calculation
  @calculation
end

#expandObject

Specifies which fields in the response should be expanded.



27
28
29
# File 'lib/stripe/services/tax/transaction_service.rb', line 27

def expand
  @expand
end

#metadataObject

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.



29
30
31
# File 'lib/stripe/services/tax/transaction_service.rb', line 29

def 
  @metadata
end

#posted_atObject

The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the ‘tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time.



31
32
33
# File 'lib/stripe/services/tax/transaction_service.rb', line 31

def posted_at
  @posted_at
end

#referenceObject

A custom order or sale identifier, such as ‘myOrder_123’. Must be unique across all transactions, including reversals.



33
34
35
# File 'lib/stripe/services/tax/transaction_service.rb', line 33

def reference
  @reference
end