This repository was archived by the owner on Jan 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +48
-1
lines changed
Expand file tree Collapse file tree 1 file changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -140,4 +140,51 @@ status.name
140140status.value
141141
142142# (<GatewayDispositionsEnum.TERMINATION: 2>, 1)
143- ```
143+ ```
144+
145+ ##### Create a context
146+ ```
147+ context_id = 'super-unique-ctx-id'
148+ data = {
149+ 'ctx': 'parent-context-id', # From survey link 'ctx' parameter
150+ 'gender': 'male',
151+ 'birth_data': '1999-09-09',
152+ 'postal_code': '90210'
153+ }
154+ gateway.create_context(context_id, data)
155+
156+ # 'super-unique-ctx-id'
157+ ```
158+
159+ ##### Retrieve a context
160+ ```
161+ gw.get_context('super-unique-ctx-id')
162+
163+ # {
164+ # 'id': 'super-unique-ctx-id',
165+ # 'items': {
166+ # 'ctx': 'parent-context-id',
167+ # 'gender': 'male',
168+ # 'birth_data': '1999-09-09',
169+ # 'postal_code': '90210'
170+ # }
171+ # }
172+ ```
173+
174+ ##### Expire a context
175+ ```
176+ gw.expire_context('super-unique-ctx-id')
177+
178+ # {
179+ # 'id': 'super-unique-ctx-id',
180+ # 'items': {
181+ # 'ctx': 'parent-context-id',
182+ # 'gender': 'male',
183+ # 'birth_data': '1999-09-09',
184+ # 'postal_code': '90210'
185+ # },
186+ # 'expiration': '2021-11-30T16:10:44Z'
187+ # }
188+ ```
189+
190+
You can’t perform that action at this time.
0 commit comments