Class: Stigg::Models::V1::Credits::GrantCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/stigg/models/v1/credits/grant_create_params.rb

Overview

Defined Under Namespace

Modules: GrantType, PaymentCollectionMethod Classes: BillingInformation, Cost

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil) ⇒ Object

The billing address

Parameters:

  • city (String) (defaults to: nil)

    City name

  • country (String) (defaults to: nil)

    Country code or name

  • line1 (String) (defaults to: nil)

    Street address line 1

  • line2 (String) (defaults to: nil)

    Street address line 2

  • postal_code (String) (defaults to: nil)

    Postal or ZIP code

  • state (String) (defaults to: nil)

    State or province



# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 112

Instance Attribute Details

#amountFloat

The credit amount to grant

Returns:

  • (Float)


16
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 16

required :amount, Float

#await_payment_confirmationBoolean?

Whether to wait for payment confirmation before returning (default: true)

Returns:

  • (Boolean, nil)


50
51
52
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 50

optional :await_payment_confirmation,
Stigg::Internal::Type::Boolean,
api_name: :awaitPaymentConfirmation

#billing_informationStigg::Models::V1::Credits::GrantCreateParams::BillingInformation?

Billing information for the credit grant



58
59
60
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 58

optional :billing_information,
-> { Stigg::V1::Credits::GrantCreateParams::BillingInformation },
api_name: :billingInformation

#commentString?

An optional comment on the credit grant

Returns:

  • (String, nil)


66
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 66

optional :comment, String

#costStigg::Models::V1::Credits::GrantCreateParams::Cost?

The monetary cost of the credit grant



72
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 72

optional :cost, -> { Stigg::V1::Credits::GrantCreateParams::Cost }

#currency_idString

The credit currency ID (required)

Returns:

  • (String)


22
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 22

required :currency_id, String, api_name: :currencyId

#customer_idString

The customer ID to grant credits to (required)

Returns:

  • (String)


28
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 28

required :customer_id, String, api_name: :customerId

#display_nameString

The display name for the credit grant

Returns:

  • (String)


34
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 34

required :display_name, String, api_name: :displayName

#effective_atTime?

The date when the credit grant becomes effective

Returns:

  • (Time, nil)


78
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 78

optional :effective_at, Time, api_name: :effectiveAt

#expire_atTime?

The date when the credit grant expires

Returns:

  • (Time, nil)


84
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 84

optional :expire_at, Time, api_name: :expireAt

#grant_typeSymbol, Stigg::Models::V1::Credits::GrantCreateParams::GrantType

The type of credit grant (PAID, PROMOTIONAL)



40
41
42
43
44
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 40

required :grant_type,
enum: -> {
  Stigg::V1::Credits::GrantCreateParams::GrantType
},
api_name: :grantType

#metadataHash{Symbol=>String}?

Additional metadata for the credit grant

Returns:

  • (Hash{Symbol=>String}, nil)


90
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 90

optional :metadata, Stigg::Internal::Type::HashOf[String]

#payment_collection_methodSymbol, ...

The payment collection method (CHARGE, INVOICE, NONE)



96
97
98
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 96

optional :payment_collection_method,
enum: -> { Stigg::V1::Credits::GrantCreateParams::PaymentCollectionMethod },
api_name: :paymentCollectionMethod

#priorityInteger?

The priority of the credit grant (lower number = higher priority)

Returns:

  • (Integer, nil)


104
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 104

optional :priority, Integer

#resource_idString?

The resource ID to scope the grant to

Returns:

  • (String, nil)


110
# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 110

optional :resource_id, String, api_name: :resourceId

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/stigg/models/v1/credits/grant_create_params.rb', line 152