Class: Stripe::Tax::Association

Inherits:
APIResource show all
Defined in:
lib/stripe/resources/tax/association.rb

Overview

A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf based on the PaymentIntent input

Defined Under Namespace

Classes: FindParams, TaxTransactionAttempt

Constant Summary collapse

OBJECT_NAME =
"tax.association"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#calculationObject (readonly)

The [Tax Calculation](stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent.



45
46
47
# File 'lib/stripe/resources/tax/association.rb', line 45

def calculation
  @calculation
end

#idObject (readonly)

Unique identifier for the object.



47
48
49
# File 'lib/stripe/resources/tax/association.rb', line 47

def id
  @id
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



49
50
51
# File 'lib/stripe/resources/tax/association.rb', line 49

def object
  @object
end

#payment_intentObject (readonly)

The [PaymentIntent](stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking.



51
52
53
# File 'lib/stripe/resources/tax/association.rb', line 51

def payment_intent
  @payment_intent
end

#tax_transaction_attemptsObject (readonly)

Information about the tax transactions linked to this payment intent



53
54
55
# File 'lib/stripe/resources/tax/association.rb', line 53

def tax_transaction_attempts
  @tax_transaction_attempts
end

Class Method Details

.find(params = {}, opts = {}) ⇒ Object

Finds a tax association object by PaymentIntent id.



56
57
58
59
60
61
62
63
# File 'lib/stripe/resources/tax/association.rb', line 56

def self.find(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/tax/associations/find",
    params: params,
    opts: opts
  )
end

.object_nameObject



9
10
11
# File 'lib/stripe/resources/tax/association.rb', line 9

def self.object_name
  "tax.association"
end