Class: Stripe::Climate::OrderService::CreateParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/climate/order_service.rb

Defined Under Namespace

Classes: Beneficiary

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, beneficiary: nil, currency: nil, expand: nil, metadata: nil, metric_tons: nil, product: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/stripe/services/climate/order_service.rb', line 49

def initialize(
  amount: nil,
  beneficiary: nil,
  currency: nil,
  expand: nil,
  metadata: nil,
  metric_tons: nil,
  product: nil
)
  @amount = amount
  @beneficiary = beneficiary
  @currency = currency
  @expand = expand
  @metadata = 
  @metric_tons = metric_tons
  @product = product
end

Instance Attribute Details

#amountObject

Requested amount of carbon removal units. Either this or ‘metric_tons` must be specified.



35
36
37
# File 'lib/stripe/services/climate/order_service.rb', line 35

def amount
  @amount
end

#beneficiaryObject

Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.



37
38
39
# File 'lib/stripe/services/climate/order_service.rb', line 37

def beneficiary
  @beneficiary
end

#currencyObject

Request currency for the order as a three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](stripe.com/docs/currencies). If omitted, the account’s default currency will be used.



39
40
41
# File 'lib/stripe/services/climate/order_service.rb', line 39

def currency
  @currency
end

#expandObject

Specifies which fields in the response should be expanded.



41
42
43
# File 'lib/stripe/services/climate/order_service.rb', line 41

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`.



43
44
45
# File 'lib/stripe/services/climate/order_service.rb', line 43

def 
  @metadata
end

#metric_tonsObject

Requested number of tons for the order. Either this or ‘amount` must be specified.



45
46
47
# File 'lib/stripe/services/climate/order_service.rb', line 45

def metric_tons
  @metric_tons
end

#productObject

Unique identifier of the Climate product.



47
48
49
# File 'lib/stripe/services/climate/order_service.rb', line 47

def product
  @product
end