-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds retrieve products implementation
- Loading branch information
1 parent
8a29370
commit c091cfb
Showing
7 changed files
with
72 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
package com.chargebee.android | ||
|
||
import com.facebook.react.bridge.ReactApplicationContext | ||
import com.facebook.react.bridge.ReactContextBaseJavaModule | ||
import com.facebook.react.bridge.Promise | ||
import com.facebook.react.bridge.ReadableMap | ||
import com.facebook.react.bridge.* | ||
|
||
abstract class ChargebeeReactNativeSpec internal constructor(context: ReactApplicationContext) : | ||
ReactContextBaseJavaModule(context) { | ||
abstract fun configure(site: String, publishableApiKey: String, sdkKey: String = "") | ||
abstract fun retrieveProductIdentifiers(queryParams: ReadableMap, promise: Promise) | ||
|
||
abstract fun retrieveProducts(productIds: ReadableArray, promise: Promise) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import type { TurboModule } from 'react-native'; | ||
import { TurboModuleRegistry } from 'react-native'; | ||
import type { Product } from '.'; | ||
|
||
export interface Spec extends TurboModule { | ||
configure(site: string, publishableApiKey: string, sdkKey: string): void; | ||
retrieveProductIdentifiers(queryParams: Object): Promise<Array<string>>; | ||
retrieveProducts(productIds: Array<string>): Promise<Product>; | ||
} | ||
|
||
export default TurboModuleRegistry.getEnforcing<Spec>('ChargebeeReactNative'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters