Class: Stripe::FrMealVouchersOnboarding

Inherits:
APIResource show all
Extended by:
APIOperations::Create, APIOperations::List
Includes:
APIOperations::Save
Defined in:
lib/stripe/resources/fr_meal_vouchers_onboarding.rb

Overview

The ‘French Meal Vouchers Onboarding` resource encapsulates the onboarding status and other related information for a single restaurant (SIRET number) in the context of the French Meal Vouchers program.

To onboard a restaurant for the French Meal Vouchers program, you create a ‘French Meal Vouchers Onboarding` object. You can retrieve individual objects, list all such objects, or update objects to correct the postal code of the restaurant. We identify `French Meal Vouchers Onboarding` objects with a unique, random ID.

Related guide: [Set up a restaurant for titres-restaurant payments](docs.stripe.com/payments/meal-vouchers/fr-meal-vouchers/set-up-restaurant)

Defined Under Namespace

Classes: Providers

Constant Summary collapse

OBJECT_NAME =
"fr_meal_vouchers_onboarding"

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 included from APIOperations::Create

create

Methods included from APIOperations::List

list

Methods included from APIOperations::Save

included, #save

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

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #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

#idObject (readonly)

Unique identifier for the object.



95
96
97
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 95

def id
  @id
end

#livemodeObject (readonly)

If the object exists in live mode, the value is ‘true`. If the object exists in test mode, the value is `false`.



97
98
99
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 97

def livemode
  @livemode
end

#metadataObject (readonly)

Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



99
100
101
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 99

def 
  @metadata
end

#nameObject (readonly)

Name of the restaurant.



101
102
103
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 101

def name
  @name
end

#objectObject (readonly)

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



103
104
105
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 103

def object
  @object
end

#postal_codeObject (readonly)

Postal code of the restaurant.



105
106
107
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 105

def postal_code
  @postal_code
end

#providersObject (readonly)

This represents the onboarding state of the restaurant on different providers.



107
108
109
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 107

def providers
  @providers
end

#siretObject (readonly)

SIRET number associated with the restaurant.



109
110
111
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 109

def siret
  @siret
end

Class Method Details

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

Creates a French Meal Vouchers Onboarding object that represents a restaurant’s onboarding status and starts the onboarding process.



112
113
114
115
116
117
118
119
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 112

def self.create(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: "/v1/fr_meal_vouchers_onboardings",
    params: params,
    opts: opts
  )
end

.field_remappingsObject



149
150
151
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 149

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



145
146
147
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 145

def self.inner_class_types
  @inner_class_types = { providers: Providers }
end

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

Lists French Meal Vouchers Onboarding objects. The objects are returned in sorted order, with the most recently created objects appearing first.



122
123
124
125
126
127
128
129
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 122

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

.object_nameObject



19
20
21
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 19

def self.object_name
  "fr_meal_vouchers_onboarding"
end

.update(id, params = {}, opts = {}) ⇒ Object

Updates the details of a restaurant’s French Meal Vouchers Onboarding object by setting the values of the parameters passed. Any parameters not provided are left unchanged. After you update the object, the onboarding process automatically restarts.

You can only update French Meal Vouchers Onboarding objects with the postal_code field requirement in past_due.



136
137
138
139
140
141
142
143
# File 'lib/stripe/resources/fr_meal_vouchers_onboarding.rb', line 136

def self.update(id, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/fr_meal_vouchers_onboardings/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts
  )
end